Initial commit
This commit is contained in:
commit
57a2089dd9
1541 changed files with 595392 additions and 0 deletions
|
@ -0,0 +1,21 @@
|
|||
.shortpixel.notice {
|
||||
padding: 8px; }
|
||||
.shortpixel.notice img {
|
||||
display: inline-block;
|
||||
margin: 0 25px 0 0;
|
||||
max-height: 50px; }
|
||||
.shortpixel.notice .notice-dismiss {
|
||||
margin-top: 10px; }
|
||||
|
||||
/* In-view notice ( not on top, between the options ) - styled after WP notice */
|
||||
.view-notice {
|
||||
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
|
||||
border: 4px solid #fff;
|
||||
padding: 1px 12px; }
|
||||
.view-notice p {
|
||||
margin: 1em 0 !important; }
|
||||
.view-notice.warning {
|
||||
border-left-color: #ffb900; }
|
||||
|
||||
.view-notice-row {
|
||||
display: none; }
|
|
@ -0,0 +1,39 @@
|
|||
|
||||
.shortpixel.notice
|
||||
{
|
||||
//padding: 18px;
|
||||
//min-height: 50px;
|
||||
padding: 8px;
|
||||
img
|
||||
{
|
||||
display:inline-block;
|
||||
margin: 0 25px 0 0;
|
||||
max-height: 50px;
|
||||
}
|
||||
.notice-dismiss
|
||||
{
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
/* In-view notice ( not on top, between the options ) - styled after WP notice */
|
||||
.view-notice
|
||||
{
|
||||
|
||||
box-shadow: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
|
||||
border: 4px solid #fff;
|
||||
|
||||
padding: 1px 12px;
|
||||
p {
|
||||
margin: 1em 0 !important;
|
||||
}
|
||||
&.warning
|
||||
{
|
||||
border-left-color: #ffb900;
|
||||
}
|
||||
}
|
||||
|
||||
.view-notice-row
|
||||
{
|
||||
display: none;
|
||||
}
|
991
wp-content/plugins/enable-media-replace/css/admin.css
Normal file
991
wp-content/plugins/enable-media-replace/css/admin.css
Normal file
|
@ -0,0 +1,991 @@
|
|||
.ui-widget-content {
|
||||
border: 1px solid #dddddd;
|
||||
background: #ffffff;
|
||||
color: #333333; }
|
||||
|
||||
.ui-widget-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%; }
|
||||
|
||||
.ui-datepicker {
|
||||
width: 17em;
|
||||
padding: .2em .2em 0;
|
||||
display: none; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-header {
|
||||
position: relative;
|
||||
padding: .2em 0; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-prev,
|
||||
.ui-datepicker .ui-datepicker-next {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
width: 1.8em;
|
||||
height: 1.8em; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-prev-hover,
|
||||
.ui-datepicker .ui-datepicker-next-hover {
|
||||
top: 1px; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-prev {
|
||||
left: 2px; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-next {
|
||||
right: 2px; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-prev-hover {
|
||||
left: 1px; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-next-hover {
|
||||
right: 1px; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-prev span,
|
||||
.ui-datepicker .ui-datepicker-next span {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -8px;
|
||||
top: 50%;
|
||||
margin-top: -8px; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-title {
|
||||
margin: 0 2.3em;
|
||||
line-height: 1.8em;
|
||||
text-align: center; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-title select {
|
||||
font-size: 1em;
|
||||
margin: 1px 0; }
|
||||
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year {
|
||||
width: 45%; }
|
||||
|
||||
.ui-datepicker table {
|
||||
width: 100%;
|
||||
font-size: .9em;
|
||||
border-collapse: collapse;
|
||||
margin: 0 0 .4em; }
|
||||
|
||||
.ui-datepicker th {
|
||||
padding: .7em .3em;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
border: 0; }
|
||||
|
||||
.ui-datepicker td {
|
||||
border: 0;
|
||||
padding: 1px; }
|
||||
|
||||
.ui-datepicker td span,
|
||||
.ui-datepicker td a {
|
||||
display: block;
|
||||
padding: .2em;
|
||||
text-align: center;
|
||||
text-decoration: none; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-buttonpane {
|
||||
background-image: none;
|
||||
margin: .7em 0 0 0;
|
||||
padding: 0 .2em;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
border-bottom: 0; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-buttonpane button {
|
||||
float: right;
|
||||
margin: .5em .2em .4em;
|
||||
cursor: pointer;
|
||||
padding: .2em .6em .3em .6em;
|
||||
width: auto;
|
||||
overflow: visible; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
|
||||
float: left; }
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi {
|
||||
width: auto; }
|
||||
|
||||
.ui-datepicker-multi .ui-datepicker-group {
|
||||
float: left; }
|
||||
|
||||
.ui-datepicker-multi .ui-datepicker-group table {
|
||||
width: 95%;
|
||||
margin: 0 auto .4em; }
|
||||
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group {
|
||||
width: 50%; }
|
||||
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group {
|
||||
width: 33.3%; }
|
||||
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group {
|
||||
width: 25%; }
|
||||
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
|
||||
border-left-width: 0; }
|
||||
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane {
|
||||
clear: left; }
|
||||
|
||||
.ui-datepicker-row-break {
|
||||
clear: both;
|
||||
width: 100%;
|
||||
font-size: 0; }
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl {
|
||||
direction: rtl; }
|
||||
|
||||
.ui-datepicker-rtl .ui-datepicker-prev {
|
||||
right: 2px;
|
||||
left: auto; }
|
||||
|
||||
.ui-datepicker-rtl .ui-datepicker-next {
|
||||
left: 2px;
|
||||
right: auto; }
|
||||
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover {
|
||||
right: 1px;
|
||||
left: auto; }
|
||||
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover {
|
||||
left: 1px;
|
||||
right: auto; }
|
||||
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane {
|
||||
clear: right; }
|
||||
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
|
||||
float: left; }
|
||||
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
|
||||
.ui-datepicker-rtl .ui-datepicker-group {
|
||||
float: right; }
|
||||
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
|
||||
border-right-width: 0;
|
||||
border-left-width: 1px; }
|
||||
|
||||
/* Icons */
|
||||
.ui-datepicker .ui-icon {
|
||||
display: block;
|
||||
text-indent: -99999px;
|
||||
overflow: hidden;
|
||||
background-repeat: no-repeat;
|
||||
left: .5em;
|
||||
top: .3em; }
|
||||
|
||||
.ui-icon {
|
||||
width: 16px;
|
||||
height: 16px; }
|
||||
|
||||
.ui-icon,
|
||||
.ui-widget-content .ui-icon {
|
||||
background-image: url("../img/ui-icons_444444_256x240.png"); }
|
||||
|
||||
.ui-widget-header .ui-icon {
|
||||
background-image: url("../img/ui-icons_444444_256x240.png"); }
|
||||
|
||||
.ui-state-hover .ui-icon,
|
||||
.ui-state-focus .ui-icon,
|
||||
.ui-button:hover .ui-icon,
|
||||
.ui-button:focus .ui-icon {
|
||||
background-image: url("../img/ui-icons_555555_256x240.png"); }
|
||||
|
||||
.ui-state-active .ui-icon,
|
||||
.ui-button:active .ui-icon {
|
||||
background-image: url("../img/ui-icons_ffffff_256x240.png"); }
|
||||
|
||||
.ui-state-highlight .ui-icon,
|
||||
.ui-button .ui-state-highlight.ui-icon {
|
||||
background-image: url("../img/ui-icons_777620_256x240.png"); }
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-blank {
|
||||
background-position: 16px 16px; }
|
||||
|
||||
.ui-icon-caret-1-n {
|
||||
background-position: 0 0; }
|
||||
|
||||
.ui-icon-caret-1-ne {
|
||||
background-position: -16px 0; }
|
||||
|
||||
.ui-icon-caret-1-e {
|
||||
background-position: -32px 0; }
|
||||
|
||||
.ui-icon-caret-1-se {
|
||||
background-position: -48px 0; }
|
||||
|
||||
.ui-icon-caret-1-s {
|
||||
background-position: -65px 0; }
|
||||
|
||||
.ui-icon-caret-1-sw {
|
||||
background-position: -80px 0; }
|
||||
|
||||
.ui-icon-caret-1-w {
|
||||
background-position: -96px 0; }
|
||||
|
||||
.ui-icon-caret-1-nw {
|
||||
background-position: -112px 0; }
|
||||
|
||||
.ui-icon-caret-2-n-s {
|
||||
background-position: -128px 0; }
|
||||
|
||||
.ui-icon-caret-2-e-w {
|
||||
background-position: -144px 0; }
|
||||
|
||||
.ui-icon-triangle-1-n {
|
||||
background-position: 0 -16px; }
|
||||
|
||||
.ui-icon-triangle-1-ne {
|
||||
background-position: -16px -16px; }
|
||||
|
||||
.ui-icon-triangle-1-e {
|
||||
background-position: -32px -16px; }
|
||||
|
||||
.ui-icon-triangle-1-se {
|
||||
background-position: -48px -16px; }
|
||||
|
||||
.ui-icon-triangle-1-s {
|
||||
background-position: -65px -16px; }
|
||||
|
||||
.ui-icon-triangle-1-sw {
|
||||
background-position: -80px -16px; }
|
||||
|
||||
.ui-icon-triangle-1-w {
|
||||
background-position: -96px -16px; }
|
||||
|
||||
.ui-icon-triangle-1-nw {
|
||||
background-position: -112px -16px; }
|
||||
|
||||
.ui-icon-triangle-2-n-s {
|
||||
background-position: -128px -16px; }
|
||||
|
||||
.ui-icon-triangle-2-e-w {
|
||||
background-position: -144px -16px; }
|
||||
|
||||
.ui-icon-arrow-1-n {
|
||||
background-position: 0 -32px; }
|
||||
|
||||
.ui-icon-arrow-1-ne {
|
||||
background-position: -16px -32px; }
|
||||
|
||||
.ui-icon-arrow-1-e {
|
||||
background-position: -32px -32px; }
|
||||
|
||||
.ui-icon-arrow-1-se {
|
||||
background-position: -48px -32px; }
|
||||
|
||||
.ui-icon-arrow-1-s {
|
||||
background-position: -65px -32px; }
|
||||
|
||||
.ui-icon-arrow-1-sw {
|
||||
background-position: -80px -32px; }
|
||||
|
||||
.ui-icon-arrow-1-w {
|
||||
background-position: -96px -32px; }
|
||||
|
||||
.ui-icon-arrow-1-nw {
|
||||
background-position: -112px -32px; }
|
||||
|
||||
.ui-icon-arrow-2-n-s {
|
||||
background-position: -128px -32px; }
|
||||
|
||||
.ui-icon-arrow-2-ne-sw {
|
||||
background-position: -144px -32px; }
|
||||
|
||||
.ui-icon-arrow-2-e-w {
|
||||
background-position: -160px -32px; }
|
||||
|
||||
.ui-icon-arrow-2-se-nw {
|
||||
background-position: -176px -32px; }
|
||||
|
||||
.ui-icon-arrowstop-1-n {
|
||||
background-position: -192px -32px; }
|
||||
|
||||
.ui-icon-arrowstop-1-e {
|
||||
background-position: -208px -32px; }
|
||||
|
||||
.ui-icon-arrowstop-1-s {
|
||||
background-position: -224px -32px; }
|
||||
|
||||
.ui-icon-arrowstop-1-w {
|
||||
background-position: -240px -32px; }
|
||||
|
||||
.ui-icon-arrowthick-1-n {
|
||||
background-position: 1px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-1-ne {
|
||||
background-position: -16px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-1-e {
|
||||
background-position: -32px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-1-se {
|
||||
background-position: -48px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-1-s {
|
||||
background-position: -64px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-1-sw {
|
||||
background-position: -80px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-1-w {
|
||||
background-position: -96px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-1-nw {
|
||||
background-position: -112px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-2-n-s {
|
||||
background-position: -128px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-2-ne-sw {
|
||||
background-position: -144px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-2-e-w {
|
||||
background-position: -160px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-2-se-nw {
|
||||
background-position: -176px -48px; }
|
||||
|
||||
.ui-icon-arrowthickstop-1-n {
|
||||
background-position: -192px -48px; }
|
||||
|
||||
.ui-icon-arrowthickstop-1-e {
|
||||
background-position: -208px -48px; }
|
||||
|
||||
.ui-icon-arrowthickstop-1-s {
|
||||
background-position: -224px -48px; }
|
||||
|
||||
.ui-icon-arrowthickstop-1-w {
|
||||
background-position: -240px -48px; }
|
||||
|
||||
.ui-icon-arrowreturnthick-1-w {
|
||||
background-position: 0 -64px; }
|
||||
|
||||
.ui-icon-arrowreturnthick-1-n {
|
||||
background-position: -16px -64px; }
|
||||
|
||||
.ui-icon-arrowreturnthick-1-e {
|
||||
background-position: -32px -64px; }
|
||||
|
||||
.ui-icon-arrowreturnthick-1-s {
|
||||
background-position: -48px -64px; }
|
||||
|
||||
.ui-icon-arrowreturn-1-w {
|
||||
background-position: -64px -64px; }
|
||||
|
||||
.ui-icon-arrowreturn-1-n {
|
||||
background-position: -80px -64px; }
|
||||
|
||||
.ui-icon-arrowreturn-1-e {
|
||||
background-position: -96px -64px; }
|
||||
|
||||
.ui-icon-arrowreturn-1-s {
|
||||
background-position: -112px -64px; }
|
||||
|
||||
.ui-icon-arrowrefresh-1-w {
|
||||
background-position: -128px -64px; }
|
||||
|
||||
.ui-icon-arrowrefresh-1-n {
|
||||
background-position: -144px -64px; }
|
||||
|
||||
.ui-icon-arrowrefresh-1-e {
|
||||
background-position: -160px -64px; }
|
||||
|
||||
.ui-icon-arrowrefresh-1-s {
|
||||
background-position: -176px -64px; }
|
||||
|
||||
.ui-icon-arrow-4 {
|
||||
background-position: 0 -80px; }
|
||||
|
||||
.ui-icon-arrow-4-diag {
|
||||
background-position: -16px -80px; }
|
||||
|
||||
.ui-icon-extlink {
|
||||
background-position: -32px -80px; }
|
||||
|
||||
.ui-icon-newwin {
|
||||
background-position: -48px -80px; }
|
||||
|
||||
.ui-icon-refresh {
|
||||
background-position: -64px -80px; }
|
||||
|
||||
.ui-icon-shuffle {
|
||||
background-position: -80px -80px; }
|
||||
|
||||
.ui-icon-transfer-e-w {
|
||||
background-position: -96px -80px; }
|
||||
|
||||
.ui-icon-transferthick-e-w {
|
||||
background-position: -112px -80px; }
|
||||
|
||||
.ui-icon-folder-collapsed {
|
||||
background-position: 0 -96px; }
|
||||
|
||||
.ui-icon-folder-open {
|
||||
background-position: -16px -96px; }
|
||||
|
||||
.ui-icon-document {
|
||||
background-position: -32px -96px; }
|
||||
|
||||
.ui-icon-document-b {
|
||||
background-position: -48px -96px; }
|
||||
|
||||
.ui-icon-note {
|
||||
background-position: -64px -96px; }
|
||||
|
||||
.ui-icon-mail-closed {
|
||||
background-position: -80px -96px; }
|
||||
|
||||
.ui-icon-mail-open {
|
||||
background-position: -96px -96px; }
|
||||
|
||||
.ui-icon-suitcase {
|
||||
background-position: -112px -96px; }
|
||||
|
||||
.ui-icon-comment {
|
||||
background-position: -128px -96px; }
|
||||
|
||||
.ui-icon-person {
|
||||
background-position: -144px -96px; }
|
||||
|
||||
.ui-icon-print {
|
||||
background-position: -160px -96px; }
|
||||
|
||||
.ui-icon-trash {
|
||||
background-position: -176px -96px; }
|
||||
|
||||
.ui-icon-locked {
|
||||
background-position: -192px -96px; }
|
||||
|
||||
.ui-icon-unlocked {
|
||||
background-position: -208px -96px; }
|
||||
|
||||
.ui-icon-bookmark {
|
||||
background-position: -224px -96px; }
|
||||
|
||||
.ui-icon-tag {
|
||||
background-position: -240px -96px; }
|
||||
|
||||
.ui-icon-home {
|
||||
background-position: 0 -112px; }
|
||||
|
||||
.ui-icon-flag {
|
||||
background-position: -16px -112px; }
|
||||
|
||||
.ui-icon-calendar {
|
||||
background-position: -32px -112px; }
|
||||
|
||||
.ui-icon-cart {
|
||||
background-position: -48px -112px; }
|
||||
|
||||
.ui-icon-pencil {
|
||||
background-position: -64px -112px; }
|
||||
|
||||
.ui-icon-clock {
|
||||
background-position: -80px -112px; }
|
||||
|
||||
.ui-icon-disk {
|
||||
background-position: -96px -112px; }
|
||||
|
||||
.ui-icon-calculator {
|
||||
background-position: -112px -112px; }
|
||||
|
||||
.ui-icon-zoomin {
|
||||
background-position: -128px -112px; }
|
||||
|
||||
.ui-icon-zoomout {
|
||||
background-position: -144px -112px; }
|
||||
|
||||
.ui-icon-search {
|
||||
background-position: -160px -112px; }
|
||||
|
||||
.ui-icon-wrench {
|
||||
background-position: -176px -112px; }
|
||||
|
||||
.ui-icon-gear {
|
||||
background-position: -192px -112px; }
|
||||
|
||||
.ui-icon-heart {
|
||||
background-position: -208px -112px; }
|
||||
|
||||
.ui-icon-star {
|
||||
background-position: -224px -112px; }
|
||||
|
||||
.ui-icon-link {
|
||||
background-position: -240px -112px; }
|
||||
|
||||
.ui-icon-cancel {
|
||||
background-position: 0 -128px; }
|
||||
|
||||
.ui-icon-plus {
|
||||
background-position: -16px -128px; }
|
||||
|
||||
.ui-icon-plusthick {
|
||||
background-position: -32px -128px; }
|
||||
|
||||
.ui-icon-minus {
|
||||
background-position: -48px -128px; }
|
||||
|
||||
.ui-icon-minusthick {
|
||||
background-position: -64px -128px; }
|
||||
|
||||
.ui-icon-close {
|
||||
background-position: -80px -128px; }
|
||||
|
||||
.ui-icon-closethick {
|
||||
background-position: -96px -128px; }
|
||||
|
||||
.ui-icon-key {
|
||||
background-position: -112px -128px; }
|
||||
|
||||
.ui-icon-lightbulb {
|
||||
background-position: -128px -128px; }
|
||||
|
||||
.ui-icon-scissors {
|
||||
background-position: -144px -128px; }
|
||||
|
||||
.ui-icon-clipboard {
|
||||
background-position: -160px -128px; }
|
||||
|
||||
.ui-icon-copy {
|
||||
background-position: -176px -128px; }
|
||||
|
||||
.ui-icon-contact {
|
||||
background-position: -192px -128px; }
|
||||
|
||||
.ui-icon-image {
|
||||
background-position: -208px -128px; }
|
||||
|
||||
.ui-icon-video {
|
||||
background-position: -224px -128px; }
|
||||
|
||||
.ui-icon-script {
|
||||
background-position: -240px -128px; }
|
||||
|
||||
.ui-icon-alert {
|
||||
background-position: 0 -144px; }
|
||||
|
||||
.ui-icon-info {
|
||||
background-position: -16px -144px; }
|
||||
|
||||
.ui-icon-notice {
|
||||
background-position: -32px -144px; }
|
||||
|
||||
.ui-icon-help {
|
||||
background-position: -48px -144px; }
|
||||
|
||||
.ui-icon-check {
|
||||
background-position: -64px -144px; }
|
||||
|
||||
.ui-icon-bullet {
|
||||
background-position: -80px -144px; }
|
||||
|
||||
.ui-icon-radio-on {
|
||||
background-position: -96px -144px; }
|
||||
|
||||
.ui-icon-radio-off {
|
||||
background-position: -112px -144px; }
|
||||
|
||||
.ui-icon-pin-w {
|
||||
background-position: -128px -144px; }
|
||||
|
||||
.ui-icon-pin-s {
|
||||
background-position: -144px -144px; }
|
||||
|
||||
.ui-icon-play {
|
||||
background-position: 0 -160px; }
|
||||
|
||||
.ui-icon-pause {
|
||||
background-position: -16px -160px; }
|
||||
|
||||
.ui-icon-seek-next {
|
||||
background-position: -32px -160px; }
|
||||
|
||||
.ui-icon-seek-prev {
|
||||
background-position: -48px -160px; }
|
||||
|
||||
.ui-icon-seek-end {
|
||||
background-position: -64px -160px; }
|
||||
|
||||
.ui-icon-seek-start {
|
||||
background-position: -80px -160px; }
|
||||
|
||||
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||
.ui-icon-seek-first {
|
||||
background-position: -80px -160px; }
|
||||
|
||||
.ui-icon-stop {
|
||||
background-position: -96px -160px; }
|
||||
|
||||
.ui-icon-eject {
|
||||
background-position: -112px -160px; }
|
||||
|
||||
.ui-icon-volume-off {
|
||||
background-position: -128px -160px; }
|
||||
|
||||
.ui-icon-volume-on {
|
||||
background-position: -144px -160px; }
|
||||
|
||||
.ui-icon-power {
|
||||
background-position: 0 -176px; }
|
||||
|
||||
.ui-icon-signal-diag {
|
||||
background-position: -16px -176px; }
|
||||
|
||||
.ui-icon-signal {
|
||||
background-position: -32px -176px; }
|
||||
|
||||
.ui-icon-battery-0 {
|
||||
background-position: -48px -176px; }
|
||||
|
||||
.ui-icon-battery-1 {
|
||||
background-position: -64px -176px; }
|
||||
|
||||
.ui-icon-battery-2 {
|
||||
background-position: -80px -176px; }
|
||||
|
||||
.ui-icon-battery-3 {
|
||||
background-position: -96px -176px; }
|
||||
|
||||
.ui-icon-circle-plus {
|
||||
background-position: 0 -192px; }
|
||||
|
||||
.ui-icon-circle-minus {
|
||||
background-position: -16px -192px; }
|
||||
|
||||
.ui-icon-circle-close {
|
||||
background-position: -32px -192px; }
|
||||
|
||||
.ui-icon-circle-triangle-e {
|
||||
background-position: -48px -192px; }
|
||||
|
||||
.ui-icon-circle-triangle-s {
|
||||
background-position: -64px -192px; }
|
||||
|
||||
.ui-icon-circle-triangle-w {
|
||||
background-position: -80px -192px; }
|
||||
|
||||
.ui-icon-circle-triangle-n {
|
||||
background-position: -96px -192px; }
|
||||
|
||||
.ui-icon-circle-arrow-e {
|
||||
background-position: -112px -192px; }
|
||||
|
||||
.ui-icon-circle-arrow-s {
|
||||
background-position: -128px -192px; }
|
||||
|
||||
.ui-icon-circle-arrow-w {
|
||||
background-position: -144px -192px; }
|
||||
|
||||
.ui-icon-circle-arrow-n {
|
||||
background-position: -160px -192px; }
|
||||
|
||||
.ui-icon-circle-zoomin {
|
||||
background-position: -176px -192px; }
|
||||
|
||||
.ui-icon-circle-zoomout {
|
||||
background-position: -192px -192px; }
|
||||
|
||||
.ui-icon-circle-check {
|
||||
background-position: -208px -192px; }
|
||||
|
||||
.ui-icon-circlesmall-plus {
|
||||
background-position: 0 -208px; }
|
||||
|
||||
.ui-icon-circlesmall-minus {
|
||||
background-position: -16px -208px; }
|
||||
|
||||
.ui-icon-circlesmall-close {
|
||||
background-position: -32px -208px; }
|
||||
|
||||
.ui-icon-squaresmall-plus {
|
||||
background-position: -48px -208px; }
|
||||
|
||||
.ui-icon-squaresmall-minus {
|
||||
background-position: -64px -208px; }
|
||||
|
||||
.ui-icon-squaresmall-close {
|
||||
background-position: -80px -208px; }
|
||||
|
||||
.ui-icon-grip-dotted-vertical {
|
||||
background-position: 0 -224px; }
|
||||
|
||||
.ui-icon-grip-dotted-horizontal {
|
||||
background-position: -16px -224px; }
|
||||
|
||||
.ui-icon-grip-solid-vertical {
|
||||
background-position: -32px -224px; }
|
||||
|
||||
.ui-icon-grip-solid-horizontal {
|
||||
background-position: -48px -224px; }
|
||||
|
||||
.ui-icon-gripsmall-diagonal-se {
|
||||
background-position: -64px -224px; }
|
||||
|
||||
.ui-icon-grip-diagonal-se {
|
||||
background-position: -80px -224px; }
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-all,
|
||||
.ui-corner-top,
|
||||
.ui-corner-left,
|
||||
.ui-corner-tl {
|
||||
border-top-left-radius: 3px; }
|
||||
|
||||
.ui-corner-all,
|
||||
.ui-corner-top,
|
||||
.ui-corner-right,
|
||||
.ui-corner-tr {
|
||||
border-top-right-radius: 3px; }
|
||||
|
||||
.ui-corner-all,
|
||||
.ui-corner-bottom,
|
||||
.ui-corner-left,
|
||||
.ui-corner-bl {
|
||||
border-bottom-left-radius: 3px; }
|
||||
|
||||
.ui-corner-all,
|
||||
.ui-corner-bottom,
|
||||
.ui-corner-right,
|
||||
.ui-corner-br {
|
||||
border-bottom-right-radius: 3px; }
|
||||
|
||||
.emr_upload_form form {
|
||||
display: flex; }
|
||||
.emr_upload_form form .upsell-wrapper {
|
||||
margin-left: 10px; }
|
||||
.emr_upload_form .wrapper {
|
||||
padding: 18px;
|
||||
border: 1px solid #ccc; }
|
||||
.emr_upload_form .wrapper .section-header {
|
||||
font-size: 18px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 6px 0;
|
||||
margin: 0 0 15px 0; }
|
||||
.emr_upload_form .image_chooser.wrapper {
|
||||
min-height: 350px; }
|
||||
.emr_upload_form .image_chooser.wrapper .emr_drop_area {
|
||||
border: 4px dashed #b4b9be;
|
||||
max-width: 600px;
|
||||
padding: 28px 14px;
|
||||
text-align: center;
|
||||
position: relative; }
|
||||
.emr_upload_form .image_chooser.wrapper .emr_drop_area h1 {
|
||||
display: none; }
|
||||
.emr_upload_form .image_chooser.wrapper .emr_drop_area .drop-wrapper {
|
||||
margin: 0 auto; }
|
||||
.emr_upload_form .image_chooser.wrapper .emr_drop_area.drop_breakout {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
max-width: none;
|
||||
border-color: #83b4d8;
|
||||
border-width: 10px;
|
||||
z-index: 999999;
|
||||
background-color: rgba(68, 68, 68, 0.7); }
|
||||
.emr_upload_form .image_chooser.wrapper .emr_drop_area.drop_breakout h1 {
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
font-size: 50px;
|
||||
line-height: 50px;
|
||||
margin-top: -25px;
|
||||
top: 50%;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
display: block; }
|
||||
.emr_upload_form .image_chooser.wrapper .emr_drop_area.drop_breakout .drop-wrapper {
|
||||
display: none; }
|
||||
.emr_upload_form .image_chooser.wrapper .image_previews {
|
||||
margin: 15px 0; }
|
||||
.emr_upload_form .image_chooser.wrapper .image_previews .image_placeholder {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin-right: 25px;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid #ddd;
|
||||
vertical-align: top;
|
||||
max-height: 500px; }
|
||||
.emr_upload_form .image_chooser.wrapper .image_previews .image_placeholder .textlayer {
|
||||
font-size: 25px;
|
||||
line-height: 25px;
|
||||
opacity: 0.7;
|
||||
position: absolute;
|
||||
color: #ccc;
|
||||
left: 48%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
border: 1px dashed #eee;
|
||||
background-color: #333;
|
||||
padding: 8px; }
|
||||
.emr_upload_form .image_chooser.wrapper .image_previews .image_placeholder .dashicons {
|
||||
font-size: 60px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -30px;
|
||||
left: 50%;
|
||||
margin-left: -30px;
|
||||
opacity: 0.5; }
|
||||
.emr_upload_form .image_chooser.wrapper .image_previews .image_placeholder .image_size {
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
bottom: -25px;
|
||||
width: 100%; }
|
||||
.emr_upload_form .image_chooser.wrapper .image_previews .image_placeholder.is_image .dashicons::before, .emr_upload_form .image_chooser.wrapper .image_previews .image_placeholder.is_image .dashicons {
|
||||
display: none; }
|
||||
.emr_upload_form .image_chooser.wrapper .image_previews .image_placeholder.not_image img {
|
||||
display: none; }
|
||||
.emr_upload_form .image_chooser.wrapper .image_previews .image_placeholder.not_image .textlayer {
|
||||
display: none; }
|
||||
.emr_upload_form .image_chooser.wrapper .image_previews .image_placeholder.not_image.is_document .textlayer {
|
||||
font-size: 18px;
|
||||
line-height: 20px;
|
||||
display: block; }
|
||||
.emr_upload_form .form-error, .emr_upload_form .form-warning {
|
||||
background: #fff;
|
||||
padding: 8px;
|
||||
border-left: 4px solid #ff0000;
|
||||
margin: 10px 0;
|
||||
display: none; }
|
||||
.emr_upload_form .form-error p, .emr_upload_form .form-warning p {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
font-weight: 700; }
|
||||
.emr_upload_form .form-warning {
|
||||
border-left: 4px solid #ffb900; }
|
||||
.emr_upload_form .option-flex-wrapper {
|
||||
display: flex; }
|
||||
.emr_upload_form .replace_type.wrapper {
|
||||
flex: 1;
|
||||
border: 1px solid #ccc;
|
||||
margin: 15px 0; }
|
||||
.emr_upload_form .replace_type.wrapper .option {
|
||||
position: relative;
|
||||
z-index: 1; }
|
||||
.emr_upload_form .replace_type.wrapper .option label {
|
||||
font-size: 1.2em; }
|
||||
.emr_upload_form .replace_type.wrapper .option .nofeature-notice {
|
||||
border: 1px solid #ccc;
|
||||
padding: 8px;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
opacity: 0.8;
|
||||
z-index: 9;
|
||||
background: #444; }
|
||||
.emr_upload_form .replace_type.wrapper .option .nofeature-notice p {
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
margin: 15px 0; }
|
||||
.emr_upload_form .options.wrapper {
|
||||
flex: 1;
|
||||
border: 1px solid #ccc;
|
||||
padding: 15px;
|
||||
margin: 15px 0 15px 35px; }
|
||||
.emr_upload_form .options.wrapper .custom_date .emr_datepicker {
|
||||
width: 150px; }
|
||||
.emr_upload_form .options.wrapper .custom_date .emr_hour, .emr_upload_form .options.wrapper .custom_date .emr_minute {
|
||||
width: 45px; }
|
||||
.emr_upload_form .options.wrapper ul li input {
|
||||
margin-right: 8px; }
|
||||
.emr_upload_form .options.wrapper .option label {
|
||||
vertical-align: top; }
|
||||
.emr_upload_form .options.wrapper .small {
|
||||
font-size: 10px;
|
||||
vertical-align: top;
|
||||
margin-left: 8px; }
|
||||
.emr_upload_form .options.wrapper .custom_date {
|
||||
margin: 8px 0 0 25px;
|
||||
visibility: hidden;
|
||||
opacity: 0; }
|
||||
.emr_upload_form .options.wrapper .custom_date span.field-title {
|
||||
display: inline-block;
|
||||
margin-bottom: 4px;
|
||||
color: #444;
|
||||
font-size: 12px;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
line-height: 26px; }
|
||||
.emr_upload_form .options.wrapper .custom_date span.field-title::before {
|
||||
font-size: 20px;
|
||||
vertical-align: top;
|
||||
margin-right: 4px; }
|
||||
.emr_upload_form .options.wrapper .location_option {
|
||||
display: none;
|
||||
margin-top: 12px; }
|
||||
.emr_upload_form .options.wrapper .location_option label {
|
||||
vertical-align: baseline;
|
||||
margin-right: 8px; }
|
||||
.emr_upload_form .form_controls.wrapper {
|
||||
clear: both;
|
||||
margin: 8px 0 15px 0;
|
||||
border: 0;
|
||||
padding: 0; }
|
||||
.emr_upload_form .form_controls.wrapper .button {
|
||||
padding-left: 20px;
|
||||
padding-right: 20px; }
|
||||
.emr_upload_form .shortpixel.notice {
|
||||
padding: 12px; }
|
||||
.emr_upload_form .shortpixel-offer {
|
||||
background: #fff;
|
||||
width: 250px;
|
||||
min-height: 270px;
|
||||
border: 1px solid #ccc;
|
||||
padding: 15px;
|
||||
margin-bottom: 25px;
|
||||
float: right;
|
||||
clear: both; }
|
||||
.emr_upload_form .shortpixel-offer h3 {
|
||||
line-height: 1.3em; }
|
||||
.emr_upload_form .shortpixel-offer.site-speed {
|
||||
background-color: #dcfdff; }
|
||||
.emr_upload_form .shortpixel-offer.site-speed .img-wrapper {
|
||||
text-align: center;
|
||||
margin: 0 0 25px 0; }
|
||||
.emr_upload_form .shortpixel-offer.site-speed .img-wrapper img {
|
||||
max-width: 140px;
|
||||
max-height: 140px;
|
||||
margin: 0; }
|
||||
.emr_upload_form .shortpixel-offer.site-speed h3 {
|
||||
color: #00d0e5;
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
line-height: 1.3em; }
|
||||
.emr_upload_form .shortpixel-offer.site-speed .button-wrapper {
|
||||
text-align: center;
|
||||
margin-top: 35px; }
|
||||
.emr_upload_form .shortpixel-offer.site-speed .button-wrapper a {
|
||||
background-color: #ff0000;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
padding: 8px;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
font-size: 20px; }
|
||||
.emr_upload_form .shortpixel-offer.site-speed .red {
|
||||
color: #ff0000; }
|
||||
@media (max-width: 1200px) {
|
||||
.emr_upload_form .image_previews {
|
||||
text-align: center; }
|
||||
.emr_upload_form .option-flex-wrapper {
|
||||
flex-direction: column; }
|
||||
.emr_upload_form .option-flex-wrapper .options.wrapper {
|
||||
margin-left: 0; } }
|
||||
@media (max-width: 960px) {
|
||||
.emr_upload_form .upsell-wrapper {
|
||||
display: none; } }
|
834
wp-content/plugins/enable-media-replace/css/admin.rtl.css
Normal file
834
wp-content/plugins/enable-media-replace/css/admin.rtl.css
Normal file
|
@ -0,0 +1,834 @@
|
|||
.ui-widget-content {
|
||||
border: 1px solid #dddddd;
|
||||
background: #ffffff;
|
||||
color: #333333; }
|
||||
|
||||
.ui-widget-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100%; }
|
||||
|
||||
.ui-datepicker {
|
||||
width: 17em;
|
||||
padding: .2em .2em 0;
|
||||
display: none; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-header {
|
||||
position: relative;
|
||||
padding: .2em 0; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-prev,
|
||||
.ui-datepicker .ui-datepicker-next {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
width: 1.8em;
|
||||
height: 1.8em; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-prev-hover,
|
||||
.ui-datepicker .ui-datepicker-next-hover {
|
||||
top: 1px; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-prev {
|
||||
right: 2px; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-next {
|
||||
left: 2px; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-prev-hover {
|
||||
right: 1px; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-next-hover {
|
||||
left: 1px; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-prev span,
|
||||
.ui-datepicker .ui-datepicker-next span {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 50%;
|
||||
margin-right: -8px;
|
||||
top: 50%;
|
||||
margin-top: -8px; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-title {
|
||||
margin: 0 2.3em;
|
||||
line-height: 1.8em;
|
||||
text-align: center; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-title select {
|
||||
font-size: 1em;
|
||||
margin: 1px 0; }
|
||||
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year {
|
||||
width: 45%; }
|
||||
|
||||
.ui-datepicker table {
|
||||
width: 100%;
|
||||
font-size: .9em;
|
||||
border-collapse: collapse;
|
||||
margin: 0 0 .4em; }
|
||||
|
||||
.ui-datepicker th {
|
||||
padding: .7em .3em;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
border: 0; }
|
||||
|
||||
.ui-datepicker td {
|
||||
border: 0;
|
||||
padding: 1px; }
|
||||
|
||||
.ui-datepicker td span,
|
||||
.ui-datepicker td a {
|
||||
display: block;
|
||||
padding: .2em;
|
||||
text-align: center;
|
||||
text-decoration: none; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-buttonpane {
|
||||
background-image: none;
|
||||
margin: .7em 0 0 0;
|
||||
padding: 0 .2em;
|
||||
border-right: 0;
|
||||
border-left: 0;
|
||||
border-bottom: 0; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-buttonpane button {
|
||||
float: left;
|
||||
margin: .5em .2em .4em;
|
||||
cursor: pointer;
|
||||
padding: .2em .6em .3em .6em;
|
||||
width: auto;
|
||||
overflow: visible; }
|
||||
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
|
||||
float: right; }
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi {
|
||||
width: auto; }
|
||||
|
||||
.ui-datepicker-multi .ui-datepicker-group {
|
||||
float: right; }
|
||||
|
||||
.ui-datepicker-multi .ui-datepicker-group table {
|
||||
width: 95%;
|
||||
margin: 0 auto .4em; }
|
||||
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group {
|
||||
width: 50%; }
|
||||
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group {
|
||||
width: 33.3%; }
|
||||
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group {
|
||||
width: 25%; }
|
||||
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
|
||||
border-right-width: 0; }
|
||||
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane {
|
||||
clear: right; }
|
||||
|
||||
.ui-datepicker-row-break {
|
||||
clear: both;
|
||||
width: 100%;
|
||||
font-size: 0; }
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl {
|
||||
direction: ltr; }
|
||||
|
||||
.ui-datepicker-rtl .ui-datepicker-prev {
|
||||
left: 2px;
|
||||
right: auto; }
|
||||
|
||||
.ui-datepicker-rtl .ui-datepicker-next {
|
||||
right: 2px;
|
||||
left: auto; }
|
||||
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover {
|
||||
left: 1px;
|
||||
right: auto; }
|
||||
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover {
|
||||
right: 1px;
|
||||
left: auto; }
|
||||
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane {
|
||||
clear: left; }
|
||||
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
|
||||
float: right; }
|
||||
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
|
||||
.ui-datepicker-rtl .ui-datepicker-group {
|
||||
float: left; }
|
||||
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
|
||||
border-left-width: 0;
|
||||
border-right-width: 1px; }
|
||||
|
||||
/* Icons */
|
||||
.ui-datepicker .ui-icon {
|
||||
display: block;
|
||||
text-indent: -99999px;
|
||||
overflow: hidden;
|
||||
background-repeat: no-repeat;
|
||||
right: .5em;
|
||||
top: .3em; }
|
||||
|
||||
.ui-icon {
|
||||
width: 16px;
|
||||
height: 16px; }
|
||||
|
||||
.ui-icon,
|
||||
.ui-widget-content .ui-icon {
|
||||
background-image: url("../img/ui-icons_444444_256x240.png"); }
|
||||
|
||||
.ui-widget-header .ui-icon {
|
||||
background-image: url("../img/ui-icons_444444_256x240.png"); }
|
||||
|
||||
.ui-state-hover .ui-icon,
|
||||
.ui-state-focus .ui-icon,
|
||||
.ui-button:hover .ui-icon,
|
||||
.ui-button:focus .ui-icon {
|
||||
background-image: url("../img/ui-icons_555555_256x240.png"); }
|
||||
|
||||
.ui-state-active .ui-icon,
|
||||
.ui-button:active .ui-icon {
|
||||
background-image: url("../img/ui-icons_ffffff_256x240.png"); }
|
||||
|
||||
.ui-state-highlight .ui-icon,
|
||||
.ui-button .ui-state-highlight.ui-icon {
|
||||
background-image: url("../img/ui-icons_777620_256x240.png"); }
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-blank {
|
||||
background-position: 16px 16px; }
|
||||
|
||||
.ui-icon-caret-1-n {
|
||||
background-position: 100% 0; }
|
||||
|
||||
.ui-icon-caret-1-ne {
|
||||
background-position: -16px 0; }
|
||||
|
||||
.ui-icon-caret-1-e {
|
||||
background-position: -32px 0; }
|
||||
|
||||
.ui-icon-caret-1-se {
|
||||
background-position: -48px 0; }
|
||||
|
||||
.ui-icon-caret-1-s {
|
||||
background-position: -65px 0; }
|
||||
|
||||
.ui-icon-caret-1-sw {
|
||||
background-position: -80px 0; }
|
||||
|
||||
.ui-icon-caret-1-w {
|
||||
background-position: -96px 0; }
|
||||
|
||||
.ui-icon-caret-1-nw {
|
||||
background-position: -112px 0; }
|
||||
|
||||
.ui-icon-caret-2-n-s {
|
||||
background-position: -128px 0; }
|
||||
|
||||
.ui-icon-caret-2-e-w {
|
||||
background-position: -144px 0; }
|
||||
|
||||
.ui-icon-triangle-1-n {
|
||||
background-position: 100% -16px; }
|
||||
|
||||
.ui-icon-triangle-1-ne {
|
||||
background-position: -16px -16px; }
|
||||
|
||||
.ui-icon-triangle-1-e {
|
||||
background-position: -32px -16px; }
|
||||
|
||||
.ui-icon-triangle-1-se {
|
||||
background-position: -48px -16px; }
|
||||
|
||||
.ui-icon-triangle-1-s {
|
||||
background-position: -65px -16px; }
|
||||
|
||||
.ui-icon-triangle-1-sw {
|
||||
background-position: -80px -16px; }
|
||||
|
||||
.ui-icon-triangle-1-w {
|
||||
background-position: -96px -16px; }
|
||||
|
||||
.ui-icon-triangle-1-nw {
|
||||
background-position: -112px -16px; }
|
||||
|
||||
.ui-icon-triangle-2-n-s {
|
||||
background-position: -128px -16px; }
|
||||
|
||||
.ui-icon-triangle-2-e-w {
|
||||
background-position: -144px -16px; }
|
||||
|
||||
.ui-icon-arrow-1-n {
|
||||
background-position: 100% -32px; }
|
||||
|
||||
.ui-icon-arrow-1-ne {
|
||||
background-position: -16px -32px; }
|
||||
|
||||
.ui-icon-arrow-1-e {
|
||||
background-position: -32px -32px; }
|
||||
|
||||
.ui-icon-arrow-1-se {
|
||||
background-position: -48px -32px; }
|
||||
|
||||
.ui-icon-arrow-1-s {
|
||||
background-position: -65px -32px; }
|
||||
|
||||
.ui-icon-arrow-1-sw {
|
||||
background-position: -80px -32px; }
|
||||
|
||||
.ui-icon-arrow-1-w {
|
||||
background-position: -96px -32px; }
|
||||
|
||||
.ui-icon-arrow-1-nw {
|
||||
background-position: -112px -32px; }
|
||||
|
||||
.ui-icon-arrow-2-n-s {
|
||||
background-position: -128px -32px; }
|
||||
|
||||
.ui-icon-arrow-2-ne-sw {
|
||||
background-position: -144px -32px; }
|
||||
|
||||
.ui-icon-arrow-2-e-w {
|
||||
background-position: -160px -32px; }
|
||||
|
||||
.ui-icon-arrow-2-se-nw {
|
||||
background-position: -176px -32px; }
|
||||
|
||||
.ui-icon-arrowstop-1-n {
|
||||
background-position: -192px -32px; }
|
||||
|
||||
.ui-icon-arrowstop-1-e {
|
||||
background-position: -208px -32px; }
|
||||
|
||||
.ui-icon-arrowstop-1-s {
|
||||
background-position: -224px -32px; }
|
||||
|
||||
.ui-icon-arrowstop-1-w {
|
||||
background-position: -240px -32px; }
|
||||
|
||||
.ui-icon-arrowthick-1-n {
|
||||
background-position: 1px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-1-ne {
|
||||
background-position: -16px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-1-e {
|
||||
background-position: -32px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-1-se {
|
||||
background-position: -48px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-1-s {
|
||||
background-position: -64px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-1-sw {
|
||||
background-position: -80px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-1-w {
|
||||
background-position: -96px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-1-nw {
|
||||
background-position: -112px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-2-n-s {
|
||||
background-position: -128px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-2-ne-sw {
|
||||
background-position: -144px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-2-e-w {
|
||||
background-position: -160px -48px; }
|
||||
|
||||
.ui-icon-arrowthick-2-se-nw {
|
||||
background-position: -176px -48px; }
|
||||
|
||||
.ui-icon-arrowthickstop-1-n {
|
||||
background-position: -192px -48px; }
|
||||
|
||||
.ui-icon-arrowthickstop-1-e {
|
||||
background-position: -208px -48px; }
|
||||
|
||||
.ui-icon-arrowthickstop-1-s {
|
||||
background-position: -224px -48px; }
|
||||
|
||||
.ui-icon-arrowthickstop-1-w {
|
||||
background-position: -240px -48px; }
|
||||
|
||||
.ui-icon-arrowreturnthick-1-w {
|
||||
background-position: 100% -64px; }
|
||||
|
||||
.ui-icon-arrowreturnthick-1-n {
|
||||
background-position: -16px -64px; }
|
||||
|
||||
.ui-icon-arrowreturnthick-1-e {
|
||||
background-position: -32px -64px; }
|
||||
|
||||
.ui-icon-arrowreturnthick-1-s {
|
||||
background-position: -48px -64px; }
|
||||
|
||||
.ui-icon-arrowreturn-1-w {
|
||||
background-position: -64px -64px; }
|
||||
|
||||
.ui-icon-arrowreturn-1-n {
|
||||
background-position: -80px -64px; }
|
||||
|
||||
.ui-icon-arrowreturn-1-e {
|
||||
background-position: -96px -64px; }
|
||||
|
||||
.ui-icon-arrowreturn-1-s {
|
||||
background-position: -112px -64px; }
|
||||
|
||||
.ui-icon-arrowrefresh-1-w {
|
||||
background-position: -128px -64px; }
|
||||
|
||||
.ui-icon-arrowrefresh-1-n {
|
||||
background-position: -144px -64px; }
|
||||
|
||||
.ui-icon-arrowrefresh-1-e {
|
||||
background-position: -160px -64px; }
|
||||
|
||||
.ui-icon-arrowrefresh-1-s {
|
||||
background-position: -176px -64px; }
|
||||
|
||||
.ui-icon-arrow-4 {
|
||||
background-position: 100% -80px; }
|
||||
|
||||
.ui-icon-arrow-4-diag {
|
||||
background-position: -16px -80px; }
|
||||
|
||||
.ui-icon-extlink {
|
||||
background-position: -32px -80px; }
|
||||
|
||||
.ui-icon-newwin {
|
||||
background-position: -48px -80px; }
|
||||
|
||||
.ui-icon-refresh {
|
||||
background-position: -64px -80px; }
|
||||
|
||||
.ui-icon-shuffle {
|
||||
background-position: -80px -80px; }
|
||||
|
||||
.ui-icon-transfer-e-w {
|
||||
background-position: -96px -80px; }
|
||||
|
||||
.ui-icon-transferthick-e-w {
|
||||
background-position: -112px -80px; }
|
||||
|
||||
.ui-icon-folder-collapsed {
|
||||
background-position: 100% -96px; }
|
||||
|
||||
.ui-icon-folder-open {
|
||||
background-position: -16px -96px; }
|
||||
|
||||
.ui-icon-document {
|
||||
background-position: -32px -96px; }
|
||||
|
||||
.ui-icon-document-b {
|
||||
background-position: -48px -96px; }
|
||||
|
||||
.ui-icon-note {
|
||||
background-position: -64px -96px; }
|
||||
|
||||
.ui-icon-mail-closed {
|
||||
background-position: -80px -96px; }
|
||||
|
||||
.ui-icon-mail-open {
|
||||
background-position: -96px -96px; }
|
||||
|
||||
.ui-icon-suitcase {
|
||||
background-position: -112px -96px; }
|
||||
|
||||
.ui-icon-comment {
|
||||
background-position: -128px -96px; }
|
||||
|
||||
.ui-icon-person {
|
||||
background-position: -144px -96px; }
|
||||
|
||||
.ui-icon-print {
|
||||
background-position: -160px -96px; }
|
||||
|
||||
.ui-icon-trash {
|
||||
background-position: -176px -96px; }
|
||||
|
||||
.ui-icon-locked {
|
||||
background-position: -192px -96px; }
|
||||
|
||||
.ui-icon-unlocked {
|
||||
background-position: -208px -96px; }
|
||||
|
||||
.ui-icon-bookmark {
|
||||
background-position: -224px -96px; }
|
||||
|
||||
.ui-icon-tag {
|
||||
background-position: -240px -96px; }
|
||||
|
||||
.ui-icon-home {
|
||||
background-position: 100% -112px; }
|
||||
|
||||
.ui-icon-flag {
|
||||
background-position: -16px -112px; }
|
||||
|
||||
.ui-icon-calendar {
|
||||
background-position: -32px -112px; }
|
||||
|
||||
.ui-icon-cart {
|
||||
background-position: -48px -112px; }
|
||||
|
||||
.ui-icon-pencil {
|
||||
background-position: -64px -112px; }
|
||||
|
||||
.ui-icon-clock {
|
||||
background-position: -80px -112px; }
|
||||
|
||||
.ui-icon-disk {
|
||||
background-position: -96px -112px; }
|
||||
|
||||
.ui-icon-calculator {
|
||||
background-position: -112px -112px; }
|
||||
|
||||
.ui-icon-zoomin {
|
||||
background-position: -128px -112px; }
|
||||
|
||||
.ui-icon-zoomout {
|
||||
background-position: -144px -112px; }
|
||||
|
||||
.ui-icon-search {
|
||||
background-position: -160px -112px; }
|
||||
|
||||
.ui-icon-wrench {
|
||||
background-position: -176px -112px; }
|
||||
|
||||
.ui-icon-gear {
|
||||
background-position: -192px -112px; }
|
||||
|
||||
.ui-icon-heart {
|
||||
background-position: -208px -112px; }
|
||||
|
||||
.ui-icon-star {
|
||||
background-position: -224px -112px; }
|
||||
|
||||
.ui-icon-link {
|
||||
background-position: -240px -112px; }
|
||||
|
||||
.ui-icon-cancel {
|
||||
background-position: 100% -128px; }
|
||||
|
||||
.ui-icon-plus {
|
||||
background-position: -16px -128px; }
|
||||
|
||||
.ui-icon-plusthick {
|
||||
background-position: -32px -128px; }
|
||||
|
||||
.ui-icon-minus {
|
||||
background-position: -48px -128px; }
|
||||
|
||||
.ui-icon-minusthick {
|
||||
background-position: -64px -128px; }
|
||||
|
||||
.ui-icon-close {
|
||||
background-position: -80px -128px; }
|
||||
|
||||
.ui-icon-closethick {
|
||||
background-position: -96px -128px; }
|
||||
|
||||
.ui-icon-key {
|
||||
background-position: -112px -128px; }
|
||||
|
||||
.ui-icon-lightbulb {
|
||||
background-position: -128px -128px; }
|
||||
|
||||
.ui-icon-scissors {
|
||||
background-position: -144px -128px; }
|
||||
|
||||
.ui-icon-clipboard {
|
||||
background-position: -160px -128px; }
|
||||
|
||||
.ui-icon-copy {
|
||||
background-position: -176px -128px; }
|
||||
|
||||
.ui-icon-contact {
|
||||
background-position: -192px -128px; }
|
||||
|
||||
.ui-icon-image {
|
||||
background-position: -208px -128px; }
|
||||
|
||||
.ui-icon-video {
|
||||
background-position: -224px -128px; }
|
||||
|
||||
.ui-icon-script {
|
||||
background-position: -240px -128px; }
|
||||
|
||||
.ui-icon-alert {
|
||||
background-position: 100% -144px; }
|
||||
|
||||
.ui-icon-info {
|
||||
background-position: -16px -144px; }
|
||||
|
||||
.ui-icon-notice {
|
||||
background-position: -32px -144px; }
|
||||
|
||||
.ui-icon-help {
|
||||
background-position: -48px -144px; }
|
||||
|
||||
.ui-icon-check {
|
||||
background-position: -64px -144px; }
|
||||
|
||||
.ui-icon-bullet {
|
||||
background-position: -80px -144px; }
|
||||
|
||||
.ui-icon-radio-on {
|
||||
background-position: -96px -144px; }
|
||||
|
||||
.ui-icon-radio-off {
|
||||
background-position: -112px -144px; }
|
||||
|
||||
.ui-icon-pin-w {
|
||||
background-position: -128px -144px; }
|
||||
|
||||
.ui-icon-pin-s {
|
||||
background-position: -144px -144px; }
|
||||
|
||||
.ui-icon-play {
|
||||
background-position: 100% -160px; }
|
||||
|
||||
.ui-icon-pause {
|
||||
background-position: -16px -160px; }
|
||||
|
||||
.ui-icon-seek-next {
|
||||
background-position: -32px -160px; }
|
||||
|
||||
.ui-icon-seek-prev {
|
||||
background-position: -48px -160px; }
|
||||
|
||||
.ui-icon-seek-end {
|
||||
background-position: -64px -160px; }
|
||||
|
||||
.ui-icon-seek-start {
|
||||
background-position: -80px -160px; }
|
||||
|
||||
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||
.ui-icon-seek-first {
|
||||
background-position: -80px -160px; }
|
||||
|
||||
.ui-icon-stop {
|
||||
background-position: -96px -160px; }
|
||||
|
||||
.ui-icon-eject {
|
||||
background-position: -112px -160px; }
|
||||
|
||||
.ui-icon-volume-off {
|
||||
background-position: -128px -160px; }
|
||||
|
||||
.ui-icon-volume-on {
|
||||
background-position: -144px -160px; }
|
||||
|
||||
.ui-icon-power {
|
||||
background-position: 100% -176px; }
|
||||
|
||||
.ui-icon-signal-diag {
|
||||
background-position: -16px -176px; }
|
||||
|
||||
.ui-icon-signal {
|
||||
background-position: -32px -176px; }
|
||||
|
||||
.ui-icon-battery-0 {
|
||||
background-position: -48px -176px; }
|
||||
|
||||
.ui-icon-battery-1 {
|
||||
background-position: -64px -176px; }
|
||||
|
||||
.ui-icon-battery-2 {
|
||||
background-position: -80px -176px; }
|
||||
|
||||
.ui-icon-battery-3 {
|
||||
background-position: -96px -176px; }
|
||||
|
||||
.ui-icon-circle-plus {
|
||||
background-position: 100% -192px; }
|
||||
|
||||
.ui-icon-circle-minus {
|
||||
background-position: -16px -192px; }
|
||||
|
||||
.ui-icon-circle-close {
|
||||
background-position: -32px -192px; }
|
||||
|
||||
.ui-icon-circle-triangle-e {
|
||||
background-position: -48px -192px; }
|
||||
|
||||
.ui-icon-circle-triangle-s {
|
||||
background-position: -64px -192px; }
|
||||
|
||||
.ui-icon-circle-triangle-w {
|
||||
background-position: -80px -192px; }
|
||||
|
||||
.ui-icon-circle-triangle-n {
|
||||
background-position: -96px -192px; }
|
||||
|
||||
.ui-icon-circle-arrow-e {
|
||||
background-position: -112px -192px; }
|
||||
|
||||
.ui-icon-circle-arrow-s {
|
||||
background-position: -128px -192px; }
|
||||
|
||||
.ui-icon-circle-arrow-w {
|
||||
background-position: -144px -192px; }
|
||||
|
||||
.ui-icon-circle-arrow-n {
|
||||
background-position: -160px -192px; }
|
||||
|
||||
.ui-icon-circle-zoomin {
|
||||
background-position: -176px -192px; }
|
||||
|
||||
.ui-icon-circle-zoomout {
|
||||
background-position: -192px -192px; }
|
||||
|
||||
.ui-icon-circle-check {
|
||||
background-position: -208px -192px; }
|
||||
|
||||
.ui-icon-circlesmall-plus {
|
||||
background-position: 100% -208px; }
|
||||
|
||||
.ui-icon-circlesmall-minus {
|
||||
background-position: -16px -208px; }
|
||||
|
||||
.ui-icon-circlesmall-close {
|
||||
background-position: -32px -208px; }
|
||||
|
||||
.ui-icon-squaresmall-plus {
|
||||
background-position: -48px -208px; }
|
||||
|
||||
.ui-icon-squaresmall-minus {
|
||||
background-position: -64px -208px; }
|
||||
|
||||
.ui-icon-squaresmall-close {
|
||||
background-position: -80px -208px; }
|
||||
|
||||
.ui-icon-grip-dotted-vertical {
|
||||
background-position: 100% -224px; }
|
||||
|
||||
.ui-icon-grip-dotted-horizontal {
|
||||
background-position: -16px -224px; }
|
||||
|
||||
.ui-icon-grip-solid-vertical {
|
||||
background-position: -32px -224px; }
|
||||
|
||||
.ui-icon-grip-solid-horizontal {
|
||||
background-position: -48px -224px; }
|
||||
|
||||
.ui-icon-gripsmall-diagonal-se {
|
||||
background-position: -64px -224px; }
|
||||
|
||||
.ui-icon-grip-diagonal-se {
|
||||
background-position: -80px -224px; }
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-all,
|
||||
.ui-corner-top,
|
||||
.ui-corner-left,
|
||||
.ui-corner-tl {
|
||||
border-top-right-radius: 3px; }
|
||||
|
||||
.ui-corner-all,
|
||||
.ui-corner-top,
|
||||
.ui-corner-right,
|
||||
.ui-corner-tr {
|
||||
border-top-left-radius: 3px; }
|
||||
|
||||
.ui-corner-all,
|
||||
.ui-corner-bottom,
|
||||
.ui-corner-left,
|
||||
.ui-corner-bl {
|
||||
border-bottom-right-radius: 3px; }
|
||||
|
||||
.ui-corner-all,
|
||||
.ui-corner-bottom,
|
||||
.ui-corner-right,
|
||||
.ui-corner-br {
|
||||
border-bottom-left-radius: 3px; }
|
||||
|
||||
.emr_upload_form .wrapper {
|
||||
margin: 15px 0;
|
||||
padding: 18px;
|
||||
border: 1px solid #ccc; }
|
||||
.emr_upload_form .wrapper .section-header {
|
||||
font-size: 18px;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 6px 0;
|
||||
margin: 0 0 15px 0; }
|
||||
.emr_upload_form .image_chooser.wrapper {
|
||||
min-height: 350px; }
|
||||
.emr_upload_form .image_chooser.wrapper .image_previews {
|
||||
margin: 15px 0; }
|
||||
.emr_upload_form .option-flex-wrapper {
|
||||
display: flex; }
|
||||
.emr_upload_form .replace_type.wrapper {
|
||||
flex: 1;
|
||||
border: 1px solid #ccc;
|
||||
margin: 15px 0; }
|
||||
.emr_upload_form .replace_type.wrapper label {
|
||||
font-size: 1.2em; }
|
||||
.emr_upload_form .options.wrapper {
|
||||
flex: 1;
|
||||
border: 1px solid #ccc;
|
||||
padding: 15px;
|
||||
margin: 15px 35px 15px 0; }
|
||||
.emr_upload_form .options.wrapper .custom_date .emr_datepicker {
|
||||
width: 150px; }
|
||||
.emr_upload_form .options.wrapper .custom_date .emr_hour, .emr_upload_form .options.wrapper .custom_date .emr_minute {
|
||||
width: 45px; }
|
||||
.emr_upload_form .options.wrapper ul li input {
|
||||
margin-left: 8px; }
|
||||
.emr_upload_form .options.wrapper .option label {
|
||||
vertical-align: top; }
|
||||
.emr_upload_form .options.wrapper .small {
|
||||
font-size: 10px;
|
||||
vertical-align: top;
|
||||
margin-right: 8px; }
|
||||
.emr_upload_form .options.wrapper .custom_date {
|
||||
margin: 8px 25px 0 0;
|
||||
visibility: hidden;
|
||||
opacity: 0; }
|
||||
.emr_upload_form .options.wrapper .custom_date span.field-title {
|
||||
display: inline-block;
|
||||
margin-bottom: 4px;
|
||||
color: #444;
|
||||
font-size: 12px;
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
line-height: 26px; }
|
||||
.emr_upload_form .options.wrapper .custom_date span.field-title::before {
|
||||
font-size: 20px;
|
||||
vertical-align: top;
|
||||
margin-left: 4px; }
|
||||
.emr_upload_form .form_controls.wrapper {
|
||||
clear: both;
|
||||
margin: 8px 0 15px 0;
|
||||
border: 0;
|
||||
padding: 0; }
|
||||
.emr_upload_form .form_controls.wrapper .button {
|
||||
padding-right: 20px;
|
||||
padding-left: 20px; }
|
||||
.emr_upload_form .shortpixel-notice {
|
||||
background: #fff;
|
||||
width: 250px;
|
||||
min-height: 270px;
|
||||
border: 1px solid #ccc;
|
||||
padding: 15px;
|
||||
margin: 0 0 10px;
|
||||
float: left; }
|
||||
.emr_upload_form .shortpixel-notice h3 {
|
||||
line-height: 1.3em; }
|
|
@ -0,0 +1,20 @@
|
|||
/* Styling for the edit attachment screen */
|
||||
#emr-replace-box .previewwrapper, #emr-showthumbs-box .previewwrapper {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
clear: both;
|
||||
margin: 3px 0; }
|
||||
#emr-replace-box .previewwrapper img, #emr-showthumbs-box .previewwrapper img {
|
||||
max-width: 100%; }
|
||||
#emr-replace-box .previewwrapper span.label, #emr-showthumbs-box .previewwrapper span.label {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
line-height: 16px;
|
||||
margin-top: -8px;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
text-align: center;
|
||||
padding: 4px 0; }
|
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.8 KiB |
355
wp-content/plugins/enable-media-replace/js/emr_admin.js
Normal file
355
wp-content/plugins/enable-media-replace/js/emr_admin.js
Normal file
|
@ -0,0 +1,355 @@
|
|||
|
||||
// interface for emr.
|
||||
var emrIf = function ($)
|
||||
{
|
||||
var source_type;
|
||||
var source_is_image;
|
||||
var target_type;
|
||||
var target_is_image;
|
||||
|
||||
var is_debug = false;
|
||||
|
||||
var is_dragging = false;
|
||||
|
||||
this.init = function()
|
||||
{
|
||||
|
||||
if ( emr_options.is_debug)
|
||||
{
|
||||
this.is_debug = true;
|
||||
this.debug('EMR Debug is active');
|
||||
}
|
||||
|
||||
$('input[name="timestamp_replace"]').on('change', $.proxy(this.checkCustomDate, this));
|
||||
$('input[name="replace_type"]').on('change', $.proxy(this.showReplaceOptions, this));
|
||||
$('input[name="userfile"]').on('change', $.proxy(this.handleImage, this));
|
||||
|
||||
// DragDrop
|
||||
$('.wrap.emr_upload_form').on('dragover', $.proxy(this.dragOverArea, this));
|
||||
$('.wrap.emr_upload_form').on('dragleave', $.proxy(this.dragOutArea, this));
|
||||
$('.emr_drop_area').on('drop', $.proxy(this.fileDrop, this));
|
||||
|
||||
this.checkCustomDate();
|
||||
this.loadDatePicker();
|
||||
|
||||
var source = $('.image_placeholder').first();
|
||||
if (typeof( $(source).data('filetype') ) !== 'undefined')
|
||||
{
|
||||
source_type = $(source).data('filetype').trim();
|
||||
this.debug('detected type - ' + source_type);
|
||||
}
|
||||
else
|
||||
source_type = ''; // error state
|
||||
|
||||
if (source.hasClass('is_image'))
|
||||
{
|
||||
source_is_image = true;
|
||||
}
|
||||
|
||||
this.updateTextLayer(source, false);
|
||||
this.showReplaceOptions();
|
||||
|
||||
}
|
||||
this.loadDatePicker = function()
|
||||
{
|
||||
$('#emr_datepicker').datepicker({
|
||||
dateFormat: emr_options.dateFormat,
|
||||
onClose: function() {
|
||||
var date = $(this).datepicker( 'getDate' );
|
||||
if (date) {
|
||||
var formattedDate = (date.getFullYear()) + "-" +
|
||||
(date.getMonth()+1) + "-" +
|
||||
date.getDate();
|
||||
$('input[name="custom_date_formatted"]').val(formattedDate);
|
||||
//$('input[name="custom_date"]').val($.datepicker.parseDate( emr_options.dateFormat, date));
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
this.checkCustomDate = function()
|
||||
{
|
||||
if ($('input[name="timestamp_replace"]:checked').val() == 3)
|
||||
this.showCustomDate();
|
||||
else
|
||||
this.hideCustomDate();
|
||||
},
|
||||
this.showCustomDate = function()
|
||||
{
|
||||
$('.custom_date').css('visibility', 'visible').fadeTo(100, 1);
|
||||
},
|
||||
this.hideCustomDate = function()
|
||||
{
|
||||
$('.custom_date').fadeTo(100,0,
|
||||
function ()
|
||||
{
|
||||
$('.custom_date').css('visibility', 'hidden');
|
||||
});
|
||||
}
|
||||
this.handleImage = function(e)
|
||||
{
|
||||
this.toggleErrors(false);
|
||||
var target = e.target;
|
||||
var file = target.files[0];
|
||||
|
||||
if (! target.files || target.files.length <= 0) // FileAPI appears to be not present, handle files on backend.
|
||||
{
|
||||
if ($('input[name="userfile"]').val().length > 0)
|
||||
this.checkSubmit();
|
||||
console.log('FileAPI not detected');
|
||||
return false;
|
||||
}
|
||||
|
||||
var status = this.checkUpload(file);
|
||||
this.debug('check upload status ' + status);
|
||||
this.debug('file size:' + file.size);
|
||||
|
||||
if (status)
|
||||
{
|
||||
this.updatePreview(file);
|
||||
}
|
||||
else {
|
||||
this.updatePreview(null);
|
||||
}
|
||||
this.checkSubmit();
|
||||
},
|
||||
this.updatePreview = function(file)
|
||||
{
|
||||
var preview = $('.image_placeholder').last();
|
||||
|
||||
$(preview).find('img').remove();
|
||||
$(preview).removeClass('is_image not_image is_document');
|
||||
var is_empty = false;
|
||||
|
||||
if (file !== null) /// file is null when empty, or error
|
||||
{
|
||||
target_is_image = (file.type.indexOf('image') >= 0) ? true : false;
|
||||
target_type = file.type.trim();
|
||||
}
|
||||
else
|
||||
{
|
||||
is_empty = true;
|
||||
}
|
||||
// If image, load thumbnail and get dimensions.
|
||||
if (file && target_is_image)
|
||||
{
|
||||
var img = new Image();
|
||||
img.src = window.URL.createObjectURL(file);
|
||||
self = this;
|
||||
|
||||
img.setAttribute('style', 'max-width:100%; max-height: 100%;');
|
||||
img.addEventListener("load", function () {
|
||||
// with formats like svg it can be rough.
|
||||
var width = img.naturalWidth;
|
||||
var height = img.naturalHeight;
|
||||
if (width == 0)
|
||||
width = img.width;
|
||||
if (height == 0)
|
||||
height = img.height;
|
||||
// $(preview).find('.textlayer').text(img.naturalWidth + ' x ' + img.naturalHeight );
|
||||
self.updateTextLayer(preview, width + ' x ' + height);
|
||||
self.updateFileSize(preview, file);
|
||||
});
|
||||
|
||||
$(preview).prepend(img);
|
||||
$(preview).addClass('is_image');
|
||||
}
|
||||
else if(file === null)
|
||||
{
|
||||
$(preview).addClass('not_image');
|
||||
$(preview).find('.dashicons').removeClass().addClass('dashicons dashicons-no');
|
||||
//$(preview).find('.textlayer').text('');
|
||||
this.updateTextLayer(preview, '');
|
||||
this.updateFileSize(preview, null);
|
||||
this.debug('File is null');
|
||||
}
|
||||
else { // not an image
|
||||
$(preview).addClass('not_image is_document');
|
||||
$(preview).find('.dashicons').removeClass().addClass('dashicons dashicons-media-document');
|
||||
//$(preview).find('.textlayer').text(file.name);
|
||||
this.updateTextLayer(preview, file.name);
|
||||
this.updateFileSize(preview, file);
|
||||
this.debug('Not image, media document');
|
||||
}
|
||||
|
||||
if (! is_empty && target_type != source_type)
|
||||
{
|
||||
this.debug(target_type + ' not ' + source_type);
|
||||
var falsePositive = this.checkFalsePositiveType(source_type, target_type);
|
||||
if (! falsePositive)
|
||||
this.warningFileType();
|
||||
}
|
||||
|
||||
if (! is_empty && emr_options.allowed_mime.indexOf(target_type) == -1)
|
||||
{
|
||||
this.debug(target_type + ' not ' + ' in allowed types ');
|
||||
var falsePositive = this.checkFalsePositiveType(source_type, target_type);
|
||||
|
||||
if (! falsePositive)
|
||||
this.warningMimeType();
|
||||
}
|
||||
// this.debug(emr_options.allowed_mime);
|
||||
|
||||
}
|
||||
this.checkFalsePositiveType = function(source_type, target_type)
|
||||
{
|
||||
// windows (sigh) reports application/zip as application/x-zip-compressed. Or something else, why not.
|
||||
if (source_type.indexOf('zip') >= 0 && target_type.indexOf('zip') >= 0)
|
||||
{
|
||||
this.debug('Finding ' + source_type + ' ' + target_type + ' close enough, false positive');
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// replace the text, check if text is there ( or hide ), and fix the layout.
|
||||
this.updateTextLayer = function (preview, newtext)
|
||||
{
|
||||
textlayer = $(preview).find('.textlayer');
|
||||
textlayer.css('opacity', '0');
|
||||
if (newtext !== false)
|
||||
textlayer.text(newtext);
|
||||
|
||||
if (textlayer.text() !== '')
|
||||
{
|
||||
textlayer.css('opacity', '0.7');
|
||||
// textlayer.css('margin-left', '-' + (textlayer.width() / 2 ) + 'px');
|
||||
}
|
||||
|
||||
},
|
||||
this.updateFileSize = function(preview, file)
|
||||
{
|
||||
if (file === null)
|
||||
{
|
||||
$(preview).find('.image_size').text('');
|
||||
return;
|
||||
}
|
||||
var bytes = file.size;
|
||||
if (bytes == 0) { return "0.00 B"; }
|
||||
var e = Math.floor(Math.log(bytes) / Math.log(1024));
|
||||
var size = (bytes/Math.pow(1024, e)).toFixed(2)+' '+' KMGTP'.charAt(e)+'B';
|
||||
|
||||
$(preview).find('.image_size').text(size);
|
||||
}
|
||||
this.checkSubmit = function()
|
||||
{
|
||||
var check = ($('input[name="userfile"]').val().length > 0) ? true : false;
|
||||
|
||||
if (check)
|
||||
{
|
||||
$('input[type="submit"]').prop('disabled', false);
|
||||
}
|
||||
else {
|
||||
$('input[type="submit"]').prop('disabled', true);
|
||||
}
|
||||
},
|
||||
this.toggleErrors = function(toggle)
|
||||
{
|
||||
$('.form-error').fadeOut();
|
||||
$('.form-warning').fadeOut();
|
||||
},
|
||||
this.checkUpload = function(fileItem)
|
||||
{
|
||||
var maxsize = emr_options.maxfilesize;
|
||||
|
||||
if ($('input[name="userfile"]').val().length <= 0)
|
||||
{
|
||||
console.info('[EMR] - Upload file value not set in form. Pick a file');
|
||||
$('input[name="userfile"]').val('');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fileItem.size > maxsize)
|
||||
{
|
||||
console.info('[EMR] - File too big for uploading - exceeds upload limits');
|
||||
this.errorFileSize(fileItem);
|
||||
$('input[name="userfile"]').val('');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
this.errorFileSize = function(fileItem)
|
||||
{
|
||||
$('.form-error.filesize').find('.fn').text(fileItem.name);
|
||||
$('.form-error.filesize').fadeIn();
|
||||
}
|
||||
this.warningFileType = function(fileItem)
|
||||
{
|
||||
$('.form-warning.filetype').fadeIn();
|
||||
}
|
||||
this.warningMimeType = function(fileItem)
|
||||
{
|
||||
$('.form-warning.mimetype').fadeIn();
|
||||
}
|
||||
this.debug = function(message)
|
||||
{
|
||||
console.debug(message);
|
||||
}
|
||||
this.showReplaceOptions = function(e)
|
||||
{
|
||||
$('section.options .location_option').hide();
|
||||
var replace_option = $('input[name="replace_type"]:checked').val();
|
||||
if (replace_option == 'replace_and_search')
|
||||
{
|
||||
$('section.options .location_option').show();
|
||||
}
|
||||
|
||||
}
|
||||
this.dragOverArea = function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
if ( this.is_dragging)
|
||||
return;
|
||||
|
||||
//this.debug('dragover');
|
||||
//$('.emr_drop_area').css('border-color', '#83b4d8');
|
||||
$('.emr_drop_area').addClass('drop_breakout');
|
||||
this.is_dragging = true;
|
||||
}
|
||||
this.dragOutArea = function(e)
|
||||
{
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
// this.debug('dragout');
|
||||
//$('.emr_drop_area').css('border-color', '#b4b9be');
|
||||
$('.emr_drop_area').removeClass('drop_breakout');
|
||||
this.is_dragging = false;
|
||||
}
|
||||
this.fileDrop = function (e)
|
||||
{
|
||||
var ev = e.originalEvent;
|
||||
this.dragOutArea(e);
|
||||
ev.preventDefault();
|
||||
e.preventDefault();
|
||||
|
||||
if (ev.dataTransfer.items) {
|
||||
// Use DataTransferItemList interface to access the file(s)
|
||||
document.getElementById('userfile').files = ev.dataTransfer.files;
|
||||
$('input[name="userfile"]').trigger('change');
|
||||
}
|
||||
}
|
||||
} // emrIf
|
||||
|
||||
jQuery(document).ready(function($)
|
||||
{
|
||||
window.enableMediaReplace = new emrIf($);
|
||||
window.enableMediaReplace.init();
|
||||
});
|
||||
|
||||
|
||||
function emrDelayedInit() {
|
||||
console.log('Checking delayed init ');
|
||||
if(typeof window.enableMediaReplace == "undefined") {
|
||||
console.log(emrIf);
|
||||
window.enableMediaReplace = new emrIf(jQuery);
|
||||
window.enableMediaReplace.init();
|
||||
}
|
||||
else if (typeof window.enableMediaReplace !== 'undefined')
|
||||
{
|
||||
// All fine.
|
||||
}
|
||||
else { // Nothing yet, try again.
|
||||
setTimeout(emrdelayedInit, 3000);
|
||||
}
|
||||
}
|
||||
setTimeout(emrDelayedInit, 3000);
|
421
wp-content/plugins/enable-media-replace/scss/_datepicker.scss
Normal file
421
wp-content/plugins/enable-media-replace/scss/_datepicker.scss
Normal file
|
@ -0,0 +1,421 @@
|
|||
// Straight from jquery UI css
|
||||
|
||||
.ui-widget-content {
|
||||
border: 1px solid #dddddd;
|
||||
background: #ffffff;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
|
||||
.ui-widget-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.ui-datepicker {
|
||||
width: 17em;
|
||||
padding: .2em .2em 0;
|
||||
display: none;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-header {
|
||||
position: relative;
|
||||
padding: .2em 0;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev,
|
||||
.ui-datepicker .ui-datepicker-next {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
width: 1.8em;
|
||||
height: 1.8em;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev-hover,
|
||||
.ui-datepicker .ui-datepicker-next-hover {
|
||||
top: 1px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev {
|
||||
left: 2px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-next {
|
||||
right: 2px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev-hover {
|
||||
left: 1px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-next-hover {
|
||||
right: 1px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-prev span,
|
||||
.ui-datepicker .ui-datepicker-next span {
|
||||
display: block;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-left: -8px;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-title {
|
||||
margin: 0 2.3em;
|
||||
line-height: 1.8em;
|
||||
text-align: center;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-title select {
|
||||
font-size: 1em;
|
||||
margin: 1px 0;
|
||||
}
|
||||
.ui-datepicker select.ui-datepicker-month,
|
||||
.ui-datepicker select.ui-datepicker-year {
|
||||
width: 45%;
|
||||
}
|
||||
.ui-datepicker table {
|
||||
width: 100%;
|
||||
font-size: .9em;
|
||||
border-collapse: collapse;
|
||||
margin: 0 0 .4em;
|
||||
}
|
||||
.ui-datepicker th {
|
||||
padding: .7em .3em;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
border: 0;
|
||||
}
|
||||
.ui-datepicker td {
|
||||
border: 0;
|
||||
padding: 1px;
|
||||
}
|
||||
.ui-datepicker td span,
|
||||
.ui-datepicker td a {
|
||||
display: block;
|
||||
padding: .2em;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-buttonpane {
|
||||
background-image: none;
|
||||
margin: .7em 0 0 0;
|
||||
padding: 0 .2em;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-buttonpane button {
|
||||
float: right;
|
||||
margin: .5em .2em .4em;
|
||||
cursor: pointer;
|
||||
padding: .2em .6em .3em .6em;
|
||||
width: auto;
|
||||
overflow: visible;
|
||||
}
|
||||
.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* with multiple calendars */
|
||||
.ui-datepicker.ui-datepicker-multi {
|
||||
width: auto;
|
||||
}
|
||||
.ui-datepicker-multi .ui-datepicker-group {
|
||||
float: left;
|
||||
}
|
||||
.ui-datepicker-multi .ui-datepicker-group table {
|
||||
width: 95%;
|
||||
margin: 0 auto .4em;
|
||||
}
|
||||
.ui-datepicker-multi-2 .ui-datepicker-group {
|
||||
width: 50%;
|
||||
}
|
||||
.ui-datepicker-multi-3 .ui-datepicker-group {
|
||||
width: 33.3%;
|
||||
}
|
||||
.ui-datepicker-multi-4 .ui-datepicker-group {
|
||||
width: 25%;
|
||||
}
|
||||
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
|
||||
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
|
||||
border-left-width: 0;
|
||||
}
|
||||
.ui-datepicker-multi .ui-datepicker-buttonpane {
|
||||
clear: left;
|
||||
}
|
||||
.ui-datepicker-row-break {
|
||||
clear: both;
|
||||
width: 100%;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
/* RTL support */
|
||||
.ui-datepicker-rtl {
|
||||
direction: rtl;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-prev {
|
||||
right: 2px;
|
||||
left: auto;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-next {
|
||||
left: 2px;
|
||||
right: auto;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-prev:hover {
|
||||
right: 1px;
|
||||
left: auto;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-next:hover {
|
||||
left: 1px;
|
||||
right: auto;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane {
|
||||
clear: right;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button {
|
||||
float: left;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
|
||||
.ui-datepicker-rtl .ui-datepicker-group {
|
||||
float: right;
|
||||
}
|
||||
.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
|
||||
.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
|
||||
border-right-width: 0;
|
||||
border-left-width: 1px;
|
||||
}
|
||||
|
||||
/* Icons */
|
||||
.ui-datepicker .ui-icon {
|
||||
display: block;
|
||||
text-indent: -99999px;
|
||||
overflow: hidden;
|
||||
background-repeat: no-repeat;
|
||||
left: .5em;
|
||||
top: .3em;
|
||||
}
|
||||
|
||||
.ui-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
.ui-icon,
|
||||
.ui-widget-content .ui-icon {
|
||||
background-image: url("../img/ui-icons_444444_256x240.png");
|
||||
}
|
||||
.ui-widget-header .ui-icon {
|
||||
background-image: url("../img/ui-icons_444444_256x240.png");
|
||||
}
|
||||
.ui-state-hover .ui-icon,
|
||||
.ui-state-focus .ui-icon,
|
||||
.ui-button:hover .ui-icon,
|
||||
.ui-button:focus .ui-icon {
|
||||
background-image: url("../img/ui-icons_555555_256x240.png");
|
||||
}
|
||||
.ui-state-active .ui-icon,
|
||||
.ui-button:active .ui-icon {
|
||||
background-image: url("../img/ui-icons_ffffff_256x240.png");
|
||||
}
|
||||
.ui-state-highlight .ui-icon,
|
||||
.ui-button .ui-state-highlight.ui-icon {
|
||||
background-image: url("../img/ui-icons_777620_256x240.png");
|
||||
}
|
||||
|
||||
/* positioning */
|
||||
.ui-icon-blank { background-position: 16px 16px; }
|
||||
.ui-icon-caret-1-n { background-position: 0 0; }
|
||||
.ui-icon-caret-1-ne { background-position: -16px 0; }
|
||||
.ui-icon-caret-1-e { background-position: -32px 0; }
|
||||
.ui-icon-caret-1-se { background-position: -48px 0; }
|
||||
.ui-icon-caret-1-s { background-position: -65px 0; }
|
||||
.ui-icon-caret-1-sw { background-position: -80px 0; }
|
||||
.ui-icon-caret-1-w { background-position: -96px 0; }
|
||||
.ui-icon-caret-1-nw { background-position: -112px 0; }
|
||||
.ui-icon-caret-2-n-s { background-position: -128px 0; }
|
||||
.ui-icon-caret-2-e-w { background-position: -144px 0; }
|
||||
.ui-icon-triangle-1-n { background-position: 0 -16px; }
|
||||
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
|
||||
.ui-icon-triangle-1-e { background-position: -32px -16px; }
|
||||
.ui-icon-triangle-1-se { background-position: -48px -16px; }
|
||||
.ui-icon-triangle-1-s { background-position: -65px -16px; }
|
||||
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
|
||||
.ui-icon-triangle-1-w { background-position: -96px -16px; }
|
||||
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
|
||||
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
|
||||
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
|
||||
.ui-icon-arrow-1-n { background-position: 0 -32px; }
|
||||
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
|
||||
.ui-icon-arrow-1-e { background-position: -32px -32px; }
|
||||
.ui-icon-arrow-1-se { background-position: -48px -32px; }
|
||||
.ui-icon-arrow-1-s { background-position: -65px -32px; }
|
||||
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
|
||||
.ui-icon-arrow-1-w { background-position: -96px -32px; }
|
||||
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
|
||||
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
|
||||
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
|
||||
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
|
||||
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
|
||||
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
|
||||
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
|
||||
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
|
||||
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
|
||||
.ui-icon-arrowthick-1-n { background-position: 1px -48px; }
|
||||
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
|
||||
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
|
||||
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
|
||||
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
|
||||
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
|
||||
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
|
||||
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
|
||||
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
|
||||
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
|
||||
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
|
||||
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
|
||||
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
|
||||
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
|
||||
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
|
||||
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
|
||||
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
|
||||
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
|
||||
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
|
||||
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
|
||||
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
|
||||
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
|
||||
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
|
||||
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
|
||||
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
|
||||
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
|
||||
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
|
||||
.ui-icon-arrow-4 { background-position: 0 -80px; }
|
||||
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
|
||||
.ui-icon-extlink { background-position: -32px -80px; }
|
||||
.ui-icon-newwin { background-position: -48px -80px; }
|
||||
.ui-icon-refresh { background-position: -64px -80px; }
|
||||
.ui-icon-shuffle { background-position: -80px -80px; }
|
||||
.ui-icon-transfer-e-w { background-position: -96px -80px; }
|
||||
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
|
||||
.ui-icon-folder-collapsed { background-position: 0 -96px; }
|
||||
.ui-icon-folder-open { background-position: -16px -96px; }
|
||||
.ui-icon-document { background-position: -32px -96px; }
|
||||
.ui-icon-document-b { background-position: -48px -96px; }
|
||||
.ui-icon-note { background-position: -64px -96px; }
|
||||
.ui-icon-mail-closed { background-position: -80px -96px; }
|
||||
.ui-icon-mail-open { background-position: -96px -96px; }
|
||||
.ui-icon-suitcase { background-position: -112px -96px; }
|
||||
.ui-icon-comment { background-position: -128px -96px; }
|
||||
.ui-icon-person { background-position: -144px -96px; }
|
||||
.ui-icon-print { background-position: -160px -96px; }
|
||||
.ui-icon-trash { background-position: -176px -96px; }
|
||||
.ui-icon-locked { background-position: -192px -96px; }
|
||||
.ui-icon-unlocked { background-position: -208px -96px; }
|
||||
.ui-icon-bookmark { background-position: -224px -96px; }
|
||||
.ui-icon-tag { background-position: -240px -96px; }
|
||||
.ui-icon-home { background-position: 0 -112px; }
|
||||
.ui-icon-flag { background-position: -16px -112px; }
|
||||
.ui-icon-calendar { background-position: -32px -112px; }
|
||||
.ui-icon-cart { background-position: -48px -112px; }
|
||||
.ui-icon-pencil { background-position: -64px -112px; }
|
||||
.ui-icon-clock { background-position: -80px -112px; }
|
||||
.ui-icon-disk { background-position: -96px -112px; }
|
||||
.ui-icon-calculator { background-position: -112px -112px; }
|
||||
.ui-icon-zoomin { background-position: -128px -112px; }
|
||||
.ui-icon-zoomout { background-position: -144px -112px; }
|
||||
.ui-icon-search { background-position: -160px -112px; }
|
||||
.ui-icon-wrench { background-position: -176px -112px; }
|
||||
.ui-icon-gear { background-position: -192px -112px; }
|
||||
.ui-icon-heart { background-position: -208px -112px; }
|
||||
.ui-icon-star { background-position: -224px -112px; }
|
||||
.ui-icon-link { background-position: -240px -112px; }
|
||||
.ui-icon-cancel { background-position: 0 -128px; }
|
||||
.ui-icon-plus { background-position: -16px -128px; }
|
||||
.ui-icon-plusthick { background-position: -32px -128px; }
|
||||
.ui-icon-minus { background-position: -48px -128px; }
|
||||
.ui-icon-minusthick { background-position: -64px -128px; }
|
||||
.ui-icon-close { background-position: -80px -128px; }
|
||||
.ui-icon-closethick { background-position: -96px -128px; }
|
||||
.ui-icon-key { background-position: -112px -128px; }
|
||||
.ui-icon-lightbulb { background-position: -128px -128px; }
|
||||
.ui-icon-scissors { background-position: -144px -128px; }
|
||||
.ui-icon-clipboard { background-position: -160px -128px; }
|
||||
.ui-icon-copy { background-position: -176px -128px; }
|
||||
.ui-icon-contact { background-position: -192px -128px; }
|
||||
.ui-icon-image { background-position: -208px -128px; }
|
||||
.ui-icon-video { background-position: -224px -128px; }
|
||||
.ui-icon-script { background-position: -240px -128px; }
|
||||
.ui-icon-alert { background-position: 0 -144px; }
|
||||
.ui-icon-info { background-position: -16px -144px; }
|
||||
.ui-icon-notice { background-position: -32px -144px; }
|
||||
.ui-icon-help { background-position: -48px -144px; }
|
||||
.ui-icon-check { background-position: -64px -144px; }
|
||||
.ui-icon-bullet { background-position: -80px -144px; }
|
||||
.ui-icon-radio-on { background-position: -96px -144px; }
|
||||
.ui-icon-radio-off { background-position: -112px -144px; }
|
||||
.ui-icon-pin-w { background-position: -128px -144px; }
|
||||
.ui-icon-pin-s { background-position: -144px -144px; }
|
||||
.ui-icon-play { background-position: 0 -160px; }
|
||||
.ui-icon-pause { background-position: -16px -160px; }
|
||||
.ui-icon-seek-next { background-position: -32px -160px; }
|
||||
.ui-icon-seek-prev { background-position: -48px -160px; }
|
||||
.ui-icon-seek-end { background-position: -64px -160px; }
|
||||
.ui-icon-seek-start { background-position: -80px -160px; }
|
||||
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
|
||||
.ui-icon-seek-first { background-position: -80px -160px; }
|
||||
.ui-icon-stop { background-position: -96px -160px; }
|
||||
.ui-icon-eject { background-position: -112px -160px; }
|
||||
.ui-icon-volume-off { background-position: -128px -160px; }
|
||||
.ui-icon-volume-on { background-position: -144px -160px; }
|
||||
.ui-icon-power { background-position: 0 -176px; }
|
||||
.ui-icon-signal-diag { background-position: -16px -176px; }
|
||||
.ui-icon-signal { background-position: -32px -176px; }
|
||||
.ui-icon-battery-0 { background-position: -48px -176px; }
|
||||
.ui-icon-battery-1 { background-position: -64px -176px; }
|
||||
.ui-icon-battery-2 { background-position: -80px -176px; }
|
||||
.ui-icon-battery-3 { background-position: -96px -176px; }
|
||||
.ui-icon-circle-plus { background-position: 0 -192px; }
|
||||
.ui-icon-circle-minus { background-position: -16px -192px; }
|
||||
.ui-icon-circle-close { background-position: -32px -192px; }
|
||||
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
|
||||
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
|
||||
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
|
||||
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
|
||||
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
|
||||
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
|
||||
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
|
||||
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
|
||||
.ui-icon-circle-zoomin { background-position: -176px -192px; }
|
||||
.ui-icon-circle-zoomout { background-position: -192px -192px; }
|
||||
.ui-icon-circle-check { background-position: -208px -192px; }
|
||||
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
|
||||
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
|
||||
.ui-icon-circlesmall-close { background-position: -32px -208px; }
|
||||
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
|
||||
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
|
||||
.ui-icon-squaresmall-close { background-position: -80px -208px; }
|
||||
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
|
||||
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
|
||||
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||
|
||||
/* Corner radius */
|
||||
.ui-corner-all,
|
||||
.ui-corner-top,
|
||||
.ui-corner-left,
|
||||
.ui-corner-tl {
|
||||
border-top-left-radius: 3px;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-top,
|
||||
.ui-corner-right,
|
||||
.ui-corner-tr {
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-bottom,
|
||||
.ui-corner-left,
|
||||
.ui-corner-bl {
|
||||
border-bottom-left-radius: 3px;
|
||||
}
|
||||
.ui-corner-all,
|
||||
.ui-corner-bottom,
|
||||
.ui-corner-right,
|
||||
.ui-corner-br {
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
362
wp-content/plugins/enable-media-replace/scss/admin.scss
Normal file
362
wp-content/plugins/enable-media-replace/scss/admin.scss
Normal file
|
@ -0,0 +1,362 @@
|
|||
@import 'datepicker';
|
||||
|
||||
.emr_upload_form
|
||||
{
|
||||
form
|
||||
{
|
||||
display: flex; //editor and upsell
|
||||
.upsell-wrapper
|
||||
{
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.wrapper
|
||||
{
|
||||
// margin: 15px 0;
|
||||
padding: 18px;
|
||||
border: 1px solid #ccc;
|
||||
|
||||
.section-header
|
||||
{
|
||||
font-size: 18px;
|
||||
//text-align: center;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 6px 0;
|
||||
margin: 0 0 15px 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.image_chooser.wrapper
|
||||
{
|
||||
min-height: 350px;
|
||||
|
||||
.emr_drop_area
|
||||
{
|
||||
border: 4px dashed #b4b9be;
|
||||
max-width: 600px;
|
||||
padding: 28px 14px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
h1 { display: none; }
|
||||
.drop-wrapper
|
||||
{
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
&.drop_breakout
|
||||
{
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right:0;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
max-width: none;
|
||||
border-color: #83b4d8;
|
||||
border-width: 10px;
|
||||
z-index: 999999;
|
||||
background-color: rgba(#444, 0.7);
|
||||
h1 {
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
font-size: 50px;
|
||||
line-height: 50px;
|
||||
margin-top: -25px;
|
||||
top: 50%;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
.drop-wrapper { display: none; }
|
||||
}
|
||||
}
|
||||
.image_previews
|
||||
{
|
||||
margin: 15px 0;
|
||||
.image_placeholder
|
||||
{
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin-right: 25px;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid #ddd;
|
||||
vertical-align: top;
|
||||
max-height: 500px;
|
||||
.textlayer
|
||||
{
|
||||
font-size: 25px;
|
||||
line-height: 25px;
|
||||
opacity: 0.7;
|
||||
position: absolute;
|
||||
color: #ccc;
|
||||
left: 48%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
border: 1px dashed #eee;
|
||||
background-color: #333;
|
||||
padding: 8px;
|
||||
//max-width: 100%;
|
||||
}
|
||||
.dashicons
|
||||
{
|
||||
font-size: 60px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -30px;
|
||||
left: 50%;
|
||||
margin-left: -30px;
|
||||
opacity: 0.5;
|
||||
|
||||
}
|
||||
.image_size
|
||||
{
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
bottom: -25px;
|
||||
width: 100%;
|
||||
}
|
||||
&.is_image
|
||||
{
|
||||
.dashicons::before, .dashicons { display: none }
|
||||
|
||||
|
||||
}
|
||||
&.not_image
|
||||
{
|
||||
img { display: none; }
|
||||
.textlayer { display: none; }
|
||||
&.is_document{
|
||||
.textlayer {
|
||||
font-size: 18px;
|
||||
line-height: 20px;
|
||||
display: block;
|
||||
|
||||
}
|
||||
}
|
||||
} // not_image
|
||||
} // image_placeholder
|
||||
} // image_previews
|
||||
} // wrapper
|
||||
|
||||
.form-error, .form-warning
|
||||
{
|
||||
background: #fff;
|
||||
padding: 8px;
|
||||
border-left: 4px solid #ff0000;
|
||||
// display: inline-block;
|
||||
margin: 10px 0;
|
||||
display: none;
|
||||
p {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
}
|
||||
.form-warning
|
||||
{
|
||||
border-left: 4px solid #ffb900;
|
||||
}
|
||||
|
||||
.option-flex-wrapper
|
||||
{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.replace_type.wrapper
|
||||
{
|
||||
flex: 1;
|
||||
border: 1px solid #ccc;
|
||||
margin: 15px 0;
|
||||
.option
|
||||
{
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
&.disabled
|
||||
{
|
||||
// color: #eee;
|
||||
}
|
||||
label
|
||||
{
|
||||
font-size: 1.2em;
|
||||
}
|
||||
.nofeature-notice
|
||||
{
|
||||
border: 1px solid #ccc;
|
||||
padding: 8px;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
opacity: 0.8;
|
||||
z-index: 9;
|
||||
background: #444;
|
||||
p {
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
margin: 15px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.options.wrapper
|
||||
{
|
||||
flex: 1;
|
||||
border: 1px solid #ccc;
|
||||
padding: 15px;
|
||||
margin: 15px 0 15px 35px;
|
||||
.custom_date
|
||||
{
|
||||
.emr_datepicker {
|
||||
width: 150px;
|
||||
}
|
||||
.emr_hour, .emr_minute
|
||||
{
|
||||
width: 45px;
|
||||
}
|
||||
}
|
||||
ul
|
||||
{
|
||||
li
|
||||
{
|
||||
input
|
||||
{
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.option
|
||||
{
|
||||
label { vertical-align: top; }
|
||||
}
|
||||
.small
|
||||
{
|
||||
font-size: 10px;
|
||||
vertical-align: top;
|
||||
margin-left: 8px;
|
||||
}
|
||||
.custom_date
|
||||
{
|
||||
margin: 8px 0 0 25px;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
span.field-title {
|
||||
display: inline-block;
|
||||
margin-bottom: 4px;
|
||||
color: #444;
|
||||
//margin-left: 8px;
|
||||
font-size: 12px;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
line-height: 26px;
|
||||
&::before
|
||||
{
|
||||
font-size: 20px;
|
||||
vertical-align: top;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
} // custom_date
|
||||
.location_option
|
||||
{
|
||||
display: none;
|
||||
margin-top: 12px;
|
||||
label
|
||||
{
|
||||
vertical-align: baseline;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form_controls.wrapper
|
||||
{
|
||||
clear: both;
|
||||
margin: 8px 0 15px 0;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
.button
|
||||
{
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.shortpixel.notice
|
||||
{
|
||||
padding: 12px;
|
||||
}
|
||||
.shortpixel-offer
|
||||
{
|
||||
background: #fff;
|
||||
width: 250px;
|
||||
min-height: 270px;
|
||||
border: 1px solid #ccc;
|
||||
padding: 15px;
|
||||
//margin: 0 0 10px 25px;
|
||||
margin-bottom:25px;
|
||||
float: right;
|
||||
clear: both;
|
||||
h3 {
|
||||
line-height: 1.3em; // match size
|
||||
}
|
||||
&.site-speed
|
||||
{
|
||||
background-color: #dcfdff;
|
||||
.img-wrapper
|
||||
{
|
||||
text-align: center;
|
||||
margin: 0 0 25px 0;
|
||||
img { max-width: 140px; max-height: 140px; margin: 0; }
|
||||
}
|
||||
h3 {
|
||||
color: #00d0e5;
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
line-height: 1.3em;
|
||||
}
|
||||
.button-wrapper
|
||||
{
|
||||
text-align: center;
|
||||
margin-top: 35px;
|
||||
a {
|
||||
background-color: #ff0000;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
padding: 8px;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
.red { color: #ff0000; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@media( max-width: 1200px)
|
||||
{
|
||||
.image_previews
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
.option-flex-wrapper {
|
||||
flex-direction: column;
|
||||
.options.wrapper
|
||||
{ margin-left: 0;}
|
||||
}
|
||||
}
|
||||
@media (max-width: 960px)
|
||||
{
|
||||
.upsell-wrapper { display: none; }
|
||||
}
|
||||
} // emr_upload_form
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
/* Styling for the edit attachment screen */
|
||||
#emr-replace-box, #emr-showthumbs-box
|
||||
{
|
||||
.previewwrapper
|
||||
{
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
clear: both;
|
||||
margin: 3px 0;
|
||||
|
||||
img { max-width: 100%; }
|
||||
span.label
|
||||
{
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
line-height: 16px;
|
||||
margin-top: -8px;
|
||||
top: 50%;
|
||||
left: 0; right: 0;
|
||||
background: rgba(0,0,0,0.5);
|
||||
text-align: center;
|
||||
padding: 4px 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
/**
|
||||
* All of the CSS for your admin-specific functionality should be
|
||||
* included in this file.
|
||||
*/
|
|
@ -0,0 +1,32 @@
|
|||
(function( $ ) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* All of the code for your admin-facing JavaScript source
|
||||
* should reside in this file.
|
||||
*
|
||||
* Note: It has been assumed you will write jQuery code here, so the
|
||||
* $ function reference has been prepared for usage within the scope
|
||||
* of this function.
|
||||
*
|
||||
* This enables you to define handlers, for when the DOM is ready:
|
||||
*
|
||||
* $(function() {
|
||||
*
|
||||
* });
|
||||
*
|
||||
* When the window is loaded:
|
||||
*
|
||||
* $( window ).load(function() {
|
||||
*
|
||||
* });
|
||||
*
|
||||
* ...and/or other possibilities.
|
||||
*
|
||||
* Ideally, it is not considered best practise to attach more than a
|
||||
* single DOM-ready or window-load handler for a particular page.
|
||||
* Although scripts in the WordPress core, Plugins and Themes may be
|
||||
* practising this, we should strive to set a better example in our own work.
|
||||
*/
|
||||
|
||||
})( jQuery );
|
|
@ -0,0 +1,4 @@
|
|||
/**
|
||||
* All of the CSS for your public-facing functionality should be
|
||||
* included in this file.
|
||||
*/
|
|
@ -0,0 +1,32 @@
|
|||
(function( $ ) {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* All of the code for your public-facing JavaScript source
|
||||
* should reside in this file.
|
||||
*
|
||||
* Note: It has been assumed you will write jQuery code here, so the
|
||||
* $ function reference has been prepared for usage within the scope
|
||||
* of this function.
|
||||
*
|
||||
* This enables you to define handlers, for when the DOM is ready:
|
||||
*
|
||||
* $(function() {
|
||||
*
|
||||
* });
|
||||
*
|
||||
* When the window is loaded:
|
||||
*
|
||||
* $( window ).load(function() {
|
||||
*
|
||||
* });
|
||||
*
|
||||
* ...and/or other possibilities.
|
||||
*
|
||||
* Ideally, it is not considered best practise to attach more than a
|
||||
* single DOM-ready or window-load handler for a particular page.
|
||||
* Although scripts in the WordPress core, Plugins and Themes may be
|
||||
* practising this, we should strive to set a better example in our own work.
|
||||
*/
|
||||
|
||||
})( jQuery );
|
|
@ -0,0 +1 @@
|
|||
body #set-post-thumbnail,body #postimagediv .inside img[src$=".svg"]{width:100%}
|
|
@ -0,0 +1 @@
|
|||
.svgs-advanced{display:none}
|
1
wp-content/plugins/svg-support/css/svgs-admin.css
Normal file
1
wp-content/plugins/svg-support/css/svgs-admin.css
Normal file
|
@ -0,0 +1 @@
|
|||
.svgs-version{font-size:10px;margin-left:7px}.postbox .inside a{text-decoration:none}h3{padding:0 12px}.help-tab-content h3{padding:0}h3.inner-title{padding:0;font-size:1.2em}.metabox-holder .postbox>h3,.metabox-holder .stuffbox>h3,.metabox-holder h2.hndle,.metabox-holder h3.hndle{font-size:1.3em;font-weight:600}.shortpixel-logo img{position:absolute;right:10px;bottom:0;width:140px}table.media .column-title .media-icon img{width:60px}
|
1
wp-content/plugins/svg-support/css/svgs-attachment.css
Normal file
1
wp-content/plugins/svg-support/css/svgs-attachment.css
Normal file
|
@ -0,0 +1 @@
|
|||
.attachment svg,.widget_media_image svg{max-width:100%;height:auto}
|
1
wp-content/plugins/svg-support/js/min/svgs-admin-notice-update-min.js
vendored
Normal file
1
wp-content/plugins/svg-support/js/min/svgs-admin-notice-update-min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
jQuery(document).ready(function($){function i(){jQuery.ajax({url:ajaxurl,data:{action:"bodhi_svgs_dismiss_admin_notice"}})}$(".svgs-upgrade-notice .notice-dismiss").click(i)});
|
1
wp-content/plugins/svg-support/js/min/svgs-inline-min.js
vendored
Normal file
1
wp-content/plugins/svg-support/js/min/svgs-inline-min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
jQuery(document).ready((function(t){(bodhisvgsInlineSupport=function(){if("true"===ForceInlineSVGActive&&jQuery("img").each((function(){void 0!==jQuery(this).attr("src")&&!1!==jQuery(this).attr("src")&&jQuery(this).attr("src").match(/\.(svg)/)&&(jQuery(this).hasClass(cssTarget.ForceInlineSVG)||jQuery(this).addClass(cssTarget.ForceInlineSVG))})),String.prototype.endsWith||(String.prototype.endsWith=function(t,e){var r=this.toString();("number"!=typeof e||!isFinite(e)||Math.floor(e)!==e||e>r.length)&&(e=r.length),e-=t.length;var s=r.lastIndexOf(t,e);return-1!==s&&s===e}),String.prototype.endsWith=function(t){var e=this.length-t.length;return e>=0&&this.lastIndexOf(t)===e},"true"===ForceInlineSVGActive)var e="img."!==cssTarget.Bodhi?cssTarget.Bodhi:"img.style-svg";else var e="img."!==cssTarget?cssTarget:"img.style-svg";t(e).each((function(e){var r=jQuery(this),s=r.attr("id"),i=r.attr("class"),n=r.attr("src");n.endsWith("svg")&&t.get(n,(function(n){var a=t(n).find("svg"),c=a.attr("id");void 0===s?void 0===c?(s="svg-replaced-"+e,a=a.attr("id",s)):s=c:a=a.attr("id",s),void 0!==i&&(a=a.attr("class",i+" replaced-svg svg-replaced-"+e)),a=a.removeAttr("xmlns:a"),r.replaceWith(a),t(document).trigger("svg.loaded",[s])}),"xml")}))})()}));
|
|
@ -0,0 +1,16 @@
|
|||
jQuery(document).ready(function ($) {
|
||||
|
||||
function svgsDismissNotice(){
|
||||
|
||||
jQuery.ajax({
|
||||
url: ajaxurl,
|
||||
data: {
|
||||
action: 'bodhi_svgs_dismiss_admin_notice'
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$('.svgs-upgrade-notice .notice-dismiss').click(svgsDismissNotice);
|
||||
|
||||
});
|
110
wp-content/plugins/svg-support/js/svgs-inline.js
Normal file
110
wp-content/plugins/svg-support/js/svgs-inline.js
Normal file
|
@ -0,0 +1,110 @@
|
|||
jQuery(document).ready(function ($) {
|
||||
|
||||
// Wrap in IIFE so that it can be called again later as bodhisvgsInlineSupport();
|
||||
(bodhisvgsInlineSupport = function() {
|
||||
|
||||
// If force inline SVG option is active then add class
|
||||
if ( ForceInlineSVGActive === 'true' ) {
|
||||
|
||||
// Find all SVG inside img and add class if it hasn't got it
|
||||
jQuery('img').each(function() {
|
||||
|
||||
// Check if the SRC attribute is present at all
|
||||
if ( typeof jQuery(this).attr('src') !== typeof undefined && jQuery(this).attr('src') !== false) {
|
||||
|
||||
// Pick only those with the extension we want
|
||||
if ( jQuery(this).attr('src').match(/\.(svg)/) ) {
|
||||
|
||||
// Add our class name
|
||||
if ( !jQuery(this).hasClass(cssTarget.ForceInlineSVG) ) {
|
||||
jQuery(this).addClass(cssTarget.ForceInlineSVG);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Polyfill to support all ye old browsers
|
||||
// delete when not needed in the future
|
||||
if (!String.prototype.endsWith) {
|
||||
String.prototype.endsWith = function(searchString, position) {
|
||||
var subjectString = this.toString();
|
||||
if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) {
|
||||
position = subjectString.length;
|
||||
}
|
||||
position -= searchString.length;
|
||||
var lastIndex = subjectString.lastIndexOf(searchString, position);
|
||||
return lastIndex !== -1 && lastIndex === position;
|
||||
};
|
||||
} // end polyfill
|
||||
|
||||
// Another snippet to support IE11
|
||||
String.prototype.endsWith = function(pattern) {
|
||||
var d = this.length - pattern.length;
|
||||
return d >= 0 && this.lastIndexOf(pattern) === d;
|
||||
};
|
||||
// End snippet to support IE11
|
||||
|
||||
// Check to see if user set alternate class
|
||||
if ( ForceInlineSVGActive === 'true' ) {
|
||||
var target = ( cssTarget.Bodhi !== 'img.' ? cssTarget.Bodhi : 'img.style-svg' );
|
||||
} else {
|
||||
var target = ( cssTarget !== 'img.' ? cssTarget : 'img.style-svg' );
|
||||
}
|
||||
|
||||
$(target).each(function(index){
|
||||
var $img = jQuery(this);
|
||||
var imgID = $img.attr('id');
|
||||
var imgClass = $img.attr('class');
|
||||
var imgURL = $img.attr('src');
|
||||
|
||||
// Set svg size to the original img size
|
||||
// var imgWidth = $img.attr('width');
|
||||
// var imgHeight = $img.attr('height');
|
||||
|
||||
if (!imgURL.endsWith('svg')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$.get(imgURL, function(data) {
|
||||
|
||||
// Get the SVG tag, ignore the rest
|
||||
var $svg = $(data).find('svg');
|
||||
|
||||
var svgID = $svg.attr('id');
|
||||
|
||||
// Add replaced image's ID to the new SVG if necessary
|
||||
if(typeof imgID === 'undefined') {
|
||||
if(typeof svgID === 'undefined') {
|
||||
imgID = 'svg-replaced-'+index;
|
||||
$svg = $svg.attr('id', imgID);
|
||||
} else {
|
||||
imgID = svgID;
|
||||
}
|
||||
} else {
|
||||
$svg = $svg.attr('id', imgID);
|
||||
}
|
||||
|
||||
// Add replaced image's classes to the new SVG
|
||||
if(typeof imgClass !== 'undefined') {
|
||||
$svg = $svg.attr('class', imgClass+' replaced-svg svg-replaced-'+index);
|
||||
}
|
||||
|
||||
// Remove any invalid XML tags as per http://validator.w3.org
|
||||
$svg = $svg.removeAttr('xmlns:a');
|
||||
|
||||
// Add size attributes
|
||||
// $svg = $svg.attr('width', imgWidth);
|
||||
// $svg = $svg.attr('height', imgHeight);
|
||||
|
||||
// Replace image with new SVG
|
||||
$img.replaceWith($svg);
|
||||
|
||||
$(document).trigger('svg.loaded', [imgID]);
|
||||
|
||||
}, 'xml');
|
||||
});
|
||||
|
||||
})(); // Execute immediately
|
||||
|
||||
});
|
|
@ -0,0 +1,10 @@
|
|||
/**
|
||||
* Featured Image Display
|
||||
*
|
||||
* Fixes the 0px featured image on edit screen
|
||||
* WooCommerce Product, Sensei Course
|
||||
*/
|
||||
body #set-post-thumbnail,
|
||||
body #postimagediv .inside img[src$=".svg"] {
|
||||
width: 100%;
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
/**
|
||||
* Hide advanced features
|
||||
*/
|
||||
.svgs-advanced {
|
||||
display: none;
|
||||
}
|
45
wp-content/plugins/svg-support/scss/svgs-admin.scss
Normal file
45
wp-content/plugins/svg-support/scss/svgs-admin.scss
Normal file
|
@ -0,0 +1,45 @@
|
|||
/**
|
||||
* Settings Page
|
||||
*/
|
||||
.svgs-version {
|
||||
font-size: 10px;
|
||||
margin-left: 7px;
|
||||
}
|
||||
.postbox .inside a {
|
||||
text-decoration: none;
|
||||
}
|
||||
h3 {
|
||||
padding: 0 12px;
|
||||
}
|
||||
.help-tab-content h3 {
|
||||
padding: 0;
|
||||
}
|
||||
h3.inner-title {
|
||||
padding: 0;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.metabox-holder {
|
||||
.postbox>h3,
|
||||
.stuffbox>h3,
|
||||
h2.hndle,
|
||||
h3.hndle {
|
||||
font-size: 1.3em;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
.shortpixel-logo img {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 0;
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Media Library
|
||||
*/
|
||||
table.media .column-title .media-icon img {
|
||||
width: 60px;
|
||||
// height: 60px;
|
||||
}
|
17
wp-content/plugins/svg-support/scss/svgs-attachment.scss
Normal file
17
wp-content/plugins/svg-support/scss/svgs-attachment.scss
Normal file
|
@ -0,0 +1,17 @@
|
|||
// .attachment img[src$=".svg"],
|
||||
// .widget_media_image img[src$=".svg"] {
|
||||
// width: 100%;
|
||||
// }
|
||||
|
||||
.attachment,
|
||||
.widget_media_image {
|
||||
|
||||
// img[src$=".svg"] {
|
||||
// width: 100%;
|
||||
// }
|
||||
|
||||
svg {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
div[data-type="tadv/classic-paragraph"].is-selected .block-library-classic__toolbar,div[data-type="tadv/classic-paragraph"].is-typing .block-library-classic__toolbar,div[data-type="tadv/classic-paragraph"] div.mce-toolbar-grp{border-color:rgba(66,88,99,.35)}div[data-type="tadv/classic-paragraph"] .block-library-classic__toolbar:empty{display:none}div[data-type="tadv/classic-paragraph"].is-selected .block-library-classic__toolbar,div[data-type="tadv/classic-paragraph"].is-typing .block-library-classic__toolbar{display:block;z-index:31}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
.tadv-buttons-panel .components-toolbar__control.tadv-icon-button>svg{box-sizing:border-box;outline:none;box-shadow:none}.tadv-buttons-panel .components-toolbar{border:none}.tadv-mark-icon{background-color:#fff9c0;background-clip:content-box}
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
div[data-type="core/freeform"].is-selected .block-library-classic__toolbar,div[data-type="core/freeform"].is-typing .block-library-classic__toolbar{z-index:31}.block-library-classic__toolbar .mce-btn .mce-txt{font-size:13px;color:#454545}.mce-tinymce-inline .mce-menubar>div,.mce-tinymce-inline .mce-toolbar .mce-btn-group>div{white-space:normal}div.mce-menubar,div.mce-menubar *{box-sizing:border-box}.block-library-classic__toolbar .mce-menubar{padding:1px}.block-library-classic__toolbar .mce-menubar .mce-menubtn button span{font-size:13px}.block-library-classic__toolbar .mce-menubar i.mce-caret{margin-top:.4em}.block-library-classic__toolbar .mce-menubar .mce-flow-layout-item{margin:2px 0}div.mce-menubar.mce-toolbar .mce-btn button{padding:3px 4px 2px}div.mce-menubar{border-color:#e5e5e5;background:#fff;border-width:0 0 1px}div.mce-menubar .mce-menubtn:focus{color:#124964;box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8)}div.mce-menu-item-sep:hover,div.mce-menu .mce-menu-item-sep{border-bottom:1px solid #ddd;height:0;margin:5px 0}div.mce-menubtn span{margin-right:0;padding-left:3px}div.mce-menu-has-icons i.mce-ico:before{margin-left:0}div.mce-menu-has-icons i.mce-ico{line-height:18px;width:18px;height:18px}.wp-core-ui .mce-menu-item .mce-text{font-size:13px}.block-library-classic__toolbar .mce-menubar .mce-menubtn.mce-active,.block-library-classic__toolbar .mce-menubar .mce-menubtn:focus,.block-library-classic__toolbar .mce-menubar .mce-menubtn:hover{border-color:transparent}.block-library-classic__toolbar .mce-menubar .mce-menubtn.mce-active span,.block-library-classic__toolbar .mce-menubar .mce-menubtn:focus span,.block-library-classic__toolbar .mce-menubar .mce-menubtn:hover span{color:#000}.mce-inline-toolbar-grp div.wp-link-input{margin:2px 4px}.mce-inline-toolbar-grp div.wp-link-input input{padding:4px}div.mce-menu-item.mce-menu-item-preview.mce-active:hover,div.mce-menu .mce-menu-item-normal.mce-active,div.mce-menu .mce-menu-item-preview.mce-active,div.mce-menu .mce-menu-item.mce-selected,div.mce-menu .mce-menu-item:focus,div.mce-menu .mce-menu-item:hover{background:#0073aa;color:#fff}div.mce-menu-item.mce-active .mce-menu-shortcut,div.mce-menu-item.mce-disabled:hover .mce-ico,div.mce-menu-item.mce-disabled:hover .mce-text,div.mce-menu-item.mce-menu-item-preview.mce-active .mce-ico,div.mce-menu-item.mce-menu-item-preview.mce-active .mce-text,div.mce-menu-item:focus .mce-ico,div.mce-menu-item:focus .mce-menu-shortcut,div.mce-menu-item:focus .mce-text,div.mce-menu-item:hover .mce-ico,div.mce-menu-item:hover .mce-menu-shortcut,div.mce-menu-item:hover .mce-text{color:inherit}div.mce-menu .mce-menu-item.mce-disabled{cursor:default}div.mce-menu .mce-menu-item.mce-disabled:hover{background:#ccc}div.mce-inline-toolbar-grp .mce-btn.mce-active:hover button,div.mce-inline-toolbar-grp .mce-btn.mce-active:hover i,div.mce-inline-toolbar-grp .mce-btn.mce-active button,div.mce-inline-toolbar-grp .mce-btn.mce-active i,div.mce-inline-toolbar-grp .mce-btn:hover button,div.mce-inline-toolbar-grp .mce-btn:hover i,div.mce-toolbar-grp .mce-btn.mce-active:hover button,div.mce-toolbar-grp .mce-btn.mce-active:hover i,div.mce-toolbar-grp .mce-btn.mce-active button,div.mce-toolbar-grp .mce-btn.mce-active i,div.mce-toolbar-grp .mce-btn:hover button,div.mce-toolbar-grp .mce-btn:hover i{color:#191e23}div.mce-inline-toolbar-grp .mce-btn i,div.mce-toolbar-grp .mce-btn i{font-style:normal}div.mce-toolbar-grp .mce-btn i.mce-ico{font-size:20px}div.mce-widget.mce-tooltip .mce-tooltip-inner{font-size:13px;opacity:1}.mce-inline-toolbar-grp.mce-panel .mce-toolbar .mce-btn{margin:1px}.mce-inline-toolbar-grp.mce-panel .mce-toolbar .mce-btn button{padding:3px}.wp-block-freeform.block-library-rich-text__tinymce table{width:100%}
|
160
wp-content/plugins/tinymce-advanced/mce/advlist/plugin.js
Normal file
160
wp-content/plugins/tinymce-advanced/mce/advlist/plugin.js
Normal file
|
@ -0,0 +1,160 @@
|
|||
(function () {
|
||||
var advlist = (function () {
|
||||
'use strict';
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
var applyListFormat = function (editor, listName, styleValue) {
|
||||
var cmd = listName === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList';
|
||||
editor.execCommand(cmd, false, styleValue === false ? null : { 'list-style-type': styleValue });
|
||||
};
|
||||
var Actions = { applyListFormat: applyListFormat };
|
||||
|
||||
var register = function (editor) {
|
||||
editor.addCommand('ApplyUnorderedListStyle', function (ui, value) {
|
||||
Actions.applyListFormat(editor, 'UL', value['list-style-type']);
|
||||
});
|
||||
editor.addCommand('ApplyOrderedListStyle', function (ui, value) {
|
||||
Actions.applyListFormat(editor, 'OL', value['list-style-type']);
|
||||
});
|
||||
};
|
||||
var Commands = { register: register };
|
||||
|
||||
var getNumberStyles = function (editor) {
|
||||
var styles = editor.getParam('advlist_number_styles', 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman');
|
||||
return styles ? styles.split(/[ ,]/) : [];
|
||||
};
|
||||
var getBulletStyles = function (editor) {
|
||||
var styles = editor.getParam('advlist_bullet_styles', 'default,circle,disc,square');
|
||||
return styles ? styles.split(/[ ,]/) : [];
|
||||
};
|
||||
var Settings = {
|
||||
getNumberStyles: getNumberStyles,
|
||||
getBulletStyles: getBulletStyles
|
||||
};
|
||||
|
||||
var isChildOfBody = function (editor, elm) {
|
||||
return editor.$.contains(editor.getBody(), elm);
|
||||
};
|
||||
var isTableCellNode = function (node) {
|
||||
return node && /^(TH|TD)$/.test(node.nodeName);
|
||||
};
|
||||
var isListNode = function (editor) {
|
||||
return function (node) {
|
||||
return node && /^(OL|UL|DL)$/.test(node.nodeName) && isChildOfBody(editor, node);
|
||||
};
|
||||
};
|
||||
var getSelectedStyleType = function (editor) {
|
||||
var listElm = editor.dom.getParent(editor.selection.getNode(), 'ol,ul');
|
||||
return editor.dom.getStyle(listElm, 'listStyleType') || '';
|
||||
};
|
||||
var ListUtils = {
|
||||
isTableCellNode: isTableCellNode,
|
||||
isListNode: isListNode,
|
||||
getSelectedStyleType: getSelectedStyleType
|
||||
};
|
||||
|
||||
var styleValueToText = function (styleValue) {
|
||||
return styleValue.replace(/\-/g, ' ').replace(/\b\w/g, function (chr) {
|
||||
return chr.toUpperCase();
|
||||
});
|
||||
};
|
||||
var toMenuItems = function (styles) {
|
||||
return global$1.map(styles, function (styleValue) {
|
||||
var text = styleValueToText(styleValue);
|
||||
var data = styleValue === 'default' ? '' : styleValue;
|
||||
return {
|
||||
text: text,
|
||||
data: data
|
||||
};
|
||||
});
|
||||
};
|
||||
var ListStyles = { toMenuItems: toMenuItems };
|
||||
|
||||
var findIndex = function (list, predicate) {
|
||||
for (var index = 0; index < list.length; index++) {
|
||||
var element = list[index];
|
||||
if (predicate(element)) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
var listState = function (editor, listName) {
|
||||
return function (e) {
|
||||
var ctrl = e.control;
|
||||
editor.on('NodeChange', function (e) {
|
||||
var tableCellIndex = findIndex(e.parents, ListUtils.isTableCellNode);
|
||||
var parents = tableCellIndex !== -1 ? e.parents.slice(0, tableCellIndex) : e.parents;
|
||||
var lists = global$1.grep(parents, ListUtils.isListNode(editor));
|
||||
ctrl.active(lists.length > 0 && lists[0].nodeName === listName);
|
||||
});
|
||||
};
|
||||
};
|
||||
var updateSelection = function (editor) {
|
||||
return function (e) {
|
||||
var listStyleType = ListUtils.getSelectedStyleType(editor);
|
||||
e.control.items().each(function (ctrl) {
|
||||
ctrl.active(ctrl.settings.data === listStyleType);
|
||||
});
|
||||
};
|
||||
};
|
||||
var addSplitButton = function (editor, id, tooltip, cmd, nodeName, styles) {
|
||||
editor.addButton(id, {
|
||||
active: false,
|
||||
type: 'splitbutton',
|
||||
tooltip: tooltip,
|
||||
menu: ListStyles.toMenuItems(styles),
|
||||
onPostRender: listState(editor, nodeName),
|
||||
onshow: updateSelection(editor),
|
||||
onselect: function (e) {
|
||||
Actions.applyListFormat(editor, nodeName, e.control.settings.data);
|
||||
},
|
||||
onclick: function () {
|
||||
editor.execCommand(cmd);
|
||||
}
|
||||
});
|
||||
};
|
||||
var addButton = function (editor, id, tooltip, cmd, nodeName, styles) {
|
||||
editor.addButton(id, {
|
||||
active: false,
|
||||
type: 'button',
|
||||
tooltip: tooltip,
|
||||
onPostRender: listState(editor, nodeName),
|
||||
onclick: function () {
|
||||
editor.execCommand(cmd);
|
||||
}
|
||||
});
|
||||
};
|
||||
var addControl = function (editor, id, tooltip, cmd, nodeName, styles) {
|
||||
if (styles.length > 0) {
|
||||
addSplitButton(editor, id, tooltip, cmd, nodeName, styles);
|
||||
} else {
|
||||
addButton(editor, id, tooltip, cmd, nodeName);
|
||||
}
|
||||
};
|
||||
var register$1 = function (editor) {
|
||||
addControl(editor, 'numlist', 'Numbered list', 'InsertOrderedList', 'OL', Settings.getNumberStyles(editor));
|
||||
addControl(editor, 'bullist', 'Bullet list', 'InsertUnorderedList', 'UL', Settings.getBulletStyles(editor));
|
||||
};
|
||||
var Buttons = { register: register$1 };
|
||||
|
||||
global.add('advlist', function (editor) {
|
||||
var hasPlugin = function (editor, plugin) {
|
||||
var plugins = editor.settings.plugins ? editor.settings.plugins : '';
|
||||
return global$1.inArray(plugins.split(/[ ,]/), plugin) !== -1;
|
||||
};
|
||||
if (hasPlugin(editor, 'lists')) {
|
||||
Buttons.register(editor);
|
||||
Commands.register(editor);
|
||||
}
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return Plugin;
|
||||
|
||||
}());
|
||||
})();
|
1
wp-content/plugins/tinymce-advanced/mce/advlist/plugin.min.js
vendored
Normal file
1
wp-content/plugins/tinymce-advanced/mce/advlist/plugin.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=function(t,e,n){var r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===n?null:{"list-style-type":n})},o=function(n){n.addCommand("ApplyUnorderedListStyle",function(t,e){s(n,"UL",e["list-style-type"])}),n.addCommand("ApplyOrderedListStyle",function(t,e){s(n,"OL",e["list-style-type"])})},e=function(t){var e=t.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");return e?e.split(/[ ,]/):[]},n=function(t){var e=t.getParam("advlist_bullet_styles","default,circle,disc,square");return e?e.split(/[ ,]/):[]},u=function(t){return t&&/^(TH|TD)$/.test(t.nodeName)},c=function(r){return function(t){return t&&/^(OL|UL|DL)$/.test(t.nodeName)&&(n=t,(e=r).$.contains(e.getBody(),n));var e,n}},d=function(t){var e=t.dom.getParent(t.selection.getNode(),"ol,ul");return t.dom.getStyle(e,"listStyleType")||""},p=function(t){return a.map(t,function(t){return{text:t.replace(/\-/g," ").replace(/\b\w/g,function(t){return t.toUpperCase()}),data:"default"===t?"":t}})},f=function(i,l){return function(t){var o=t.control;i.on("NodeChange",function(t){var e=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n;return-1}(t.parents,u),n=-1!==e?t.parents.slice(0,e):t.parents,r=a.grep(n,c(i));o.active(0<r.length&&r[0].nodeName===l)})}},m=function(e,t,n,r,o,i){var l;e.addButton(t,{active:!1,type:"splitbutton",tooltip:n,menu:p(i),onPostRender:f(e,o),onshow:(l=e,function(t){var e=d(l);t.control.items().each(function(t){t.active(t.settings.data===e)})}),onselect:function(t){s(e,o,t.control.settings.data)},onclick:function(){e.execCommand(r)}})},r=function(t,e,n,r,o,i){var l,a,s,u,c;0<i.length?m(t,e,n,r,o,i):(a=e,s=n,u=r,c=o,(l=t).addButton(a,{active:!1,type:"button",tooltip:s,onPostRender:f(l,c),onclick:function(){l.execCommand(u)}}))},i=function(t){r(t,"numlist","Numbered list","InsertOrderedList","OL",e(t)),r(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))};t.add("advlist",function(t){var e,n,r;n="lists",r=(e=t).settings.plugins?e.settings.plugins:"",-1!==a.inArray(r.split(/[ ,]/),n)&&(i(t),o(t))})}();
|
118
wp-content/plugins/tinymce-advanced/mce/anchor/plugin.js
Normal file
118
wp-content/plugins/tinymce-advanced/mce/anchor/plugin.js
Normal file
|
@ -0,0 +1,118 @@
|
|||
(function () {
|
||||
var anchor = (function () {
|
||||
'use strict';
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
var isValidId = function (id) {
|
||||
return /^[A-Za-z][A-Za-z0-9\-:._]*$/.test(id);
|
||||
};
|
||||
var getId = function (editor) {
|
||||
var selectedNode = editor.selection.getNode();
|
||||
var isAnchor = selectedNode.tagName === 'A' && editor.dom.getAttrib(selectedNode, 'href') === '';
|
||||
return isAnchor ? selectedNode.id || selectedNode.name : '';
|
||||
};
|
||||
var insert = function (editor, id) {
|
||||
var selectedNode = editor.selection.getNode();
|
||||
var isAnchor = selectedNode.tagName === 'A' && editor.dom.getAttrib(selectedNode, 'href') === '';
|
||||
if (isAnchor) {
|
||||
selectedNode.removeAttribute('name');
|
||||
selectedNode.id = id;
|
||||
editor.undoManager.add();
|
||||
} else {
|
||||
editor.focus();
|
||||
editor.selection.collapse(true);
|
||||
editor.execCommand('mceInsertContent', false, editor.dom.createHTML('a', { id: id }));
|
||||
}
|
||||
};
|
||||
var Anchor = {
|
||||
isValidId: isValidId,
|
||||
getId: getId,
|
||||
insert: insert
|
||||
};
|
||||
|
||||
var insertAnchor = function (editor, newId) {
|
||||
if (!Anchor.isValidId(newId)) {
|
||||
editor.windowManager.alert('Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.');
|
||||
return true;
|
||||
} else {
|
||||
Anchor.insert(editor, newId);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
var open = function (editor) {
|
||||
var currentId = Anchor.getId(editor);
|
||||
editor.windowManager.open({
|
||||
title: 'Anchor',
|
||||
body: {
|
||||
type: 'textbox',
|
||||
name: 'id',
|
||||
size: 40,
|
||||
label: 'Id',
|
||||
value: currentId
|
||||
},
|
||||
onsubmit: function (e) {
|
||||
var newId = e.data.id;
|
||||
if (insertAnchor(editor, newId)) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
var Dialog = { open: open };
|
||||
|
||||
var register = function (editor) {
|
||||
editor.addCommand('mceAnchor', function () {
|
||||
Dialog.open(editor);
|
||||
});
|
||||
};
|
||||
var Commands = { register: register };
|
||||
|
||||
var isAnchorNode = function (node) {
|
||||
return !node.attr('href') && (node.attr('id') || node.attr('name')) && !node.firstChild;
|
||||
};
|
||||
var setContentEditable = function (state) {
|
||||
return function (nodes) {
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
if (isAnchorNode(nodes[i])) {
|
||||
nodes[i].attr('contenteditable', state);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
var setup = function (editor) {
|
||||
editor.on('PreInit', function () {
|
||||
editor.parser.addNodeFilter('a', setContentEditable('false'));
|
||||
editor.serializer.addNodeFilter('a', setContentEditable(null));
|
||||
});
|
||||
};
|
||||
var FilterContent = { setup: setup };
|
||||
|
||||
var register$1 = function (editor) {
|
||||
editor.addButton('anchor', {
|
||||
icon: 'anchor',
|
||||
tooltip: 'Anchor',
|
||||
cmd: 'mceAnchor',
|
||||
stateSelector: 'a:not([href])'
|
||||
});
|
||||
editor.addMenuItem('anchor', {
|
||||
icon: 'anchor',
|
||||
text: 'Anchor',
|
||||
context: 'insert',
|
||||
cmd: 'mceAnchor'
|
||||
});
|
||||
};
|
||||
var Buttons = { register: register$1 };
|
||||
|
||||
global.add('anchor', function (editor) {
|
||||
FilterContent.setup(editor);
|
||||
Commands.register(editor);
|
||||
Buttons.register(editor);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return Plugin;
|
||||
|
||||
}());
|
||||
})();
|
1
wp-content/plugins/tinymce-advanced/mce/anchor/plugin.min.js
vendored
Normal file
1
wp-content/plugins/tinymce-advanced/mce/anchor/plugin.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(t){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)},e=function(t){var e=t.selection.getNode();return"A"===e.tagName&&""===t.dom.getAttrib(e,"href")?e.id||e.name:""},i=function(t,e){var n=t.selection.getNode();"A"===n.tagName&&""===t.dom.getAttrib(n,"href")?(n.removeAttribute("name"),n.id=e,t.undoManager.add()):(t.focus(),t.selection.collapse(!0),t.execCommand("mceInsertContent",!1,t.dom.createHTML("a",{id:e})))},n=function(r){var t=e(r);r.windowManager.open({title:"Anchor",body:{type:"textbox",name:"id",size:40,label:"Id",value:t},onsubmit:function(t){var e,n,o=t.data.id;e=r,(a(n=o)?(i(e,n),0):(e.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),1))&&t.preventDefault()}})},o=function(t){t.addCommand("mceAnchor",function(){n(t)})},r=function(o){return function(t){for(var e=0;e<t.length;e++)(n=t[e]).attr("href")||!n.attr("id")&&!n.attr("name")||n.firstChild||t[e].attr("contenteditable",o);var n}},c=function(t){t.on("PreInit",function(){t.parser.addNodeFilter("a",r("false")),t.serializer.addNodeFilter("a",r(null))})},d=function(t){t.addButton("anchor",{icon:"anchor",tooltip:"Anchor",cmd:"mceAnchor",stateSelector:"a:not([href])"}),t.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",cmd:"mceAnchor"})};t.add("anchor",function(t){c(t),o(t),d(t)})}();
|
94
wp-content/plugins/tinymce-advanced/mce/code/plugin.js
Normal file
94
wp-content/plugins/tinymce-advanced/mce/code/plugin.js
Normal file
|
@ -0,0 +1,94 @@
|
|||
(function () {
|
||||
var code = (function () {
|
||||
'use strict';
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
||||
|
||||
var getMinWidth = function (editor) {
|
||||
return editor.getParam('code_dialog_width', 600);
|
||||
};
|
||||
var getMinHeight = function (editor) {
|
||||
return editor.getParam('code_dialog_height', Math.min(global$1.DOM.getViewPort().h - 200, 500));
|
||||
};
|
||||
var Settings = {
|
||||
getMinWidth: getMinWidth,
|
||||
getMinHeight: getMinHeight
|
||||
};
|
||||
|
||||
var setContent = function (editor, html) {
|
||||
editor.focus();
|
||||
editor.undoManager.transact(function () {
|
||||
editor.setContent(html);
|
||||
});
|
||||
editor.selection.setCursorLocation();
|
||||
editor.nodeChanged();
|
||||
};
|
||||
var getContent = function (editor) {
|
||||
return editor.getContent({ source_view: true });
|
||||
};
|
||||
var Content = {
|
||||
setContent: setContent,
|
||||
getContent: getContent
|
||||
};
|
||||
|
||||
var open = function (editor) {
|
||||
var minWidth = Settings.getMinWidth(editor);
|
||||
var minHeight = Settings.getMinHeight(editor);
|
||||
var win = editor.windowManager.open({
|
||||
title: 'Source code',
|
||||
body: {
|
||||
type: 'textbox',
|
||||
name: 'code',
|
||||
multiline: true,
|
||||
minWidth: minWidth,
|
||||
minHeight: minHeight,
|
||||
spellcheck: false,
|
||||
style: 'direction: ltr; text-align: left'
|
||||
},
|
||||
onSubmit: function (e) {
|
||||
Content.setContent(editor, e.data.code);
|
||||
}
|
||||
});
|
||||
win.find('#code').value(Content.getContent(editor));
|
||||
};
|
||||
var Dialog = { open: open };
|
||||
|
||||
var register = function (editor) {
|
||||
editor.addCommand('mceCodeEditor', function () {
|
||||
Dialog.open(editor);
|
||||
});
|
||||
};
|
||||
var Commands = { register: register };
|
||||
|
||||
var register$1 = function (editor) {
|
||||
editor.addButton('code', {
|
||||
icon: 'code',
|
||||
tooltip: 'Source code',
|
||||
onclick: function () {
|
||||
Dialog.open(editor);
|
||||
}
|
||||
});
|
||||
editor.addMenuItem('code', {
|
||||
icon: 'code',
|
||||
text: 'Source code',
|
||||
onclick: function () {
|
||||
Dialog.open(editor);
|
||||
}
|
||||
});
|
||||
};
|
||||
var Buttons = { register: register$1 };
|
||||
|
||||
global.add('code', function (editor) {
|
||||
Commands.register(editor);
|
||||
Buttons.register(editor);
|
||||
return {};
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return Plugin;
|
||||
|
||||
}());
|
||||
})();
|
1
wp-content/plugins/tinymce-advanced/mce/code/plugin.min.js
vendored
Normal file
1
wp-content/plugins/tinymce-advanced/mce/code/plugin.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),o=function(t){return t.getParam("code_dialog_width",600)},i=function(t){return t.getParam("code_dialog_height",Math.min(n.DOM.getViewPort().h-200,500))},c=function(t,n){t.focus(),t.undoManager.transact(function(){t.setContent(n)}),t.selection.setCursorLocation(),t.nodeChanged()},d=function(t){return t.getContent({source_view:!0})},e=function(n){var t=o(n),e=i(n);n.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:t,minHeight:e,spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(t){c(n,t.data.code)}}).find("#code").value(d(n))},u=function(t){t.addCommand("mceCodeEditor",function(){e(t)})},a=function(t){t.addButton("code",{icon:"code",tooltip:"Source code",onclick:function(){e(t)}}),t.addMenuItem("code",{icon:"code",text:"Source code",onclick:function(){e(t)}})};t.add("code",function(t){return u(t),a(t),{}})}();
|
168
wp-content/plugins/tinymce-advanced/mce/contextmenu/plugin.js
Normal file
168
wp-content/plugins/tinymce-advanced/mce/contextmenu/plugin.js
Normal file
|
@ -0,0 +1,168 @@
|
|||
(function () {
|
||||
var contextmenu = (function () {
|
||||
'use strict';
|
||||
|
||||
var Cell = function (initial) {
|
||||
var value = initial;
|
||||
var get = function () {
|
||||
return value;
|
||||
};
|
||||
var set = function (v) {
|
||||
value = v;
|
||||
};
|
||||
var clone = function () {
|
||||
return Cell(get());
|
||||
};
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
clone: clone
|
||||
};
|
||||
};
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
var get = function (visibleState) {
|
||||
var isContextMenuVisible = function () {
|
||||
return visibleState.get();
|
||||
};
|
||||
return { isContextMenuVisible: isContextMenuVisible };
|
||||
};
|
||||
var Api = { get: get };
|
||||
|
||||
var shouldNeverUseNative = function (editor) {
|
||||
return editor.settings.contextmenu_never_use_native;
|
||||
};
|
||||
var getContextMenu = function (editor) {
|
||||
return editor.getParam('contextmenu', 'link openlink image inserttable | cell row column deletetable');
|
||||
};
|
||||
var Settings = {
|
||||
shouldNeverUseNative: shouldNeverUseNative,
|
||||
getContextMenu: getContextMenu
|
||||
};
|
||||
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
||||
|
||||
var getUiContainer = function (editor) {
|
||||
return global$1.DOM.select(editor.settings.ui_container)[0];
|
||||
};
|
||||
|
||||
var nu = function (x, y) {
|
||||
return {
|
||||
x: x,
|
||||
y: y
|
||||
};
|
||||
};
|
||||
var transpose = function (pos, dx, dy) {
|
||||
return nu(pos.x + dx, pos.y + dy);
|
||||
};
|
||||
var fromPageXY = function (e) {
|
||||
return nu(e.pageX, e.pageY);
|
||||
};
|
||||
var fromClientXY = function (e) {
|
||||
return nu(e.clientX, e.clientY);
|
||||
};
|
||||
var transposeUiContainer = function (element, pos) {
|
||||
if (element && global$1.DOM.getStyle(element, 'position', true) !== 'static') {
|
||||
var containerPos = global$1.DOM.getPos(element);
|
||||
var dx = containerPos.x - element.scrollLeft;
|
||||
var dy = containerPos.y - element.scrollTop;
|
||||
return transpose(pos, -dx, -dy);
|
||||
} else {
|
||||
return transpose(pos, 0, 0);
|
||||
}
|
||||
};
|
||||
var transposeContentAreaContainer = function (element, pos) {
|
||||
var containerPos = global$1.DOM.getPos(element);
|
||||
return transpose(pos, containerPos.x, containerPos.y);
|
||||
};
|
||||
var getPos = function (editor, e) {
|
||||
if (editor.inline) {
|
||||
return transposeUiContainer(getUiContainer(editor), fromPageXY(e));
|
||||
} else {
|
||||
var iframePos = transposeContentAreaContainer(editor.getContentAreaContainer(), fromClientXY(e));
|
||||
return transposeUiContainer(getUiContainer(editor), iframePos);
|
||||
}
|
||||
};
|
||||
var Coords = { getPos: getPos };
|
||||
|
||||
var global$2 = tinymce.util.Tools.resolve('tinymce.ui.Factory');
|
||||
|
||||
var global$3 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
var renderMenu = function (editor, visibleState) {
|
||||
var menu, contextmenu;
|
||||
var items = [];
|
||||
contextmenu = Settings.getContextMenu(editor);
|
||||
global$3.each(contextmenu.split(/[ ,]/), function (name) {
|
||||
var item = editor.menuItems[name];
|
||||
if (name === '|') {
|
||||
item = { text: name };
|
||||
}
|
||||
if (item) {
|
||||
item.shortcut = '';
|
||||
items.push(item);
|
||||
}
|
||||
});
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
if (items[i].text === '|') {
|
||||
if (i === 0 || i === items.length - 1) {
|
||||
items.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
menu = global$2.create('menu', {
|
||||
items: items,
|
||||
context: 'contextmenu',
|
||||
classes: 'contextmenu'
|
||||
});
|
||||
menu.uiContainer = getUiContainer(editor);
|
||||
menu.renderTo(getUiContainer(editor));
|
||||
menu.on('hide', function (e) {
|
||||
if (e.control === this) {
|
||||
visibleState.set(false);
|
||||
}
|
||||
});
|
||||
editor.on('remove', function () {
|
||||
menu.remove();
|
||||
menu = null;
|
||||
});
|
||||
return menu;
|
||||
};
|
||||
var show = function (editor, pos, visibleState, menu) {
|
||||
if (menu.get() === null) {
|
||||
menu.set(renderMenu(editor, visibleState));
|
||||
} else {
|
||||
menu.get().show();
|
||||
}
|
||||
menu.get().moveTo(pos.x, pos.y);
|
||||
visibleState.set(true);
|
||||
};
|
||||
var ContextMenu = { show: show };
|
||||
|
||||
var isNativeOverrideKeyEvent = function (editor, e) {
|
||||
return e.ctrlKey && !Settings.shouldNeverUseNative(editor);
|
||||
};
|
||||
var setup = function (editor, visibleState, menu) {
|
||||
editor.on('contextmenu', function (e) {
|
||||
if (isNativeOverrideKeyEvent(editor, e)) {
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
ContextMenu.show(editor, Coords.getPos(editor, e), visibleState, menu);
|
||||
});
|
||||
};
|
||||
var Bind = { setup: setup };
|
||||
|
||||
global.add('contextmenu', function (editor) {
|
||||
var menu = Cell(null), visibleState = Cell(false);
|
||||
Bind.setup(editor, visibleState, menu);
|
||||
return Api.get(visibleState);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return Plugin;
|
||||
|
||||
}());
|
||||
})();
|
1
wp-content/plugins/tinymce-advanced/mce/contextmenu/plugin.min.js
vendored
Normal file
1
wp-content/plugins/tinymce-advanced/mce/contextmenu/plugin.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(){"use strict";var o=function(t){var n=t,e=function(){return n};return{get:e,set:function(t){n=t},clone:function(){return o(e())}}},t=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(t){return{isContextMenuVisible:function(){return t.get()}}},r=function(t){return t.settings.contextmenu_never_use_native},u=function(t){return t.getParam("contextmenu","link openlink image inserttable | cell row column deletetable")},l=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),s=function(t){return l.DOM.select(t.settings.ui_container)[0]},a=function(t,n){return{x:t,y:n}},f=function(t,n,e){return a(t.x+n,t.y+e)},m=function(t,n){if(t&&"static"!==l.DOM.getStyle(t,"position",!0)){var e=l.DOM.getPos(t),o=e.x-t.scrollLeft,i=e.y-t.scrollTop;return f(n,-o,-i)}return f(n,0,0)},c=function(t,n){if(t.inline)return m(s(t),a((u=n).pageX,u.pageY));var e,o,i,r,u,c=(e=t.getContentAreaContainer(),o=a((r=n).clientX,r.clientY),i=l.DOM.getPos(e),f(o,i.x,i.y));return m(s(t),c)},g=tinymce.util.Tools.resolve("tinymce.ui.Factory"),v=tinymce.util.Tools.resolve("tinymce.util.Tools"),y=function(t,n,e,o){null===o.get()?o.set(function(e,n){var t,o,i=[];o=u(e),v.each(o.split(/[ ,]/),function(t){var n=e.menuItems[t];"|"===t&&(n={text:t}),n&&(n.shortcut="",i.push(n))});for(var r=0;r<i.length;r++)"|"===i[r].text&&(0!==r&&r!==i.length-1||i.splice(r,1));return(t=g.create("menu",{items:i,context:"contextmenu",classes:"contextmenu"})).uiContainer=s(e),t.renderTo(s(e)),t.on("hide",function(t){t.control===this&&n.set(!1)}),e.on("remove",function(){t.remove(),t=null}),t}(t,e)):o.get().show(),o.get().moveTo(n.x,n.y),e.set(!0)},x=function(e,o,i){e.on("contextmenu",function(t){var n;n=e,(!t.ctrlKey||r(n))&&(t.preventDefault(),y(e,c(e,t),o,i))})};t.add("contextmenu",function(t){var n=o(null),e=o(!1);return x(t,e,n),i(e)})}();
|
87
wp-content/plugins/tinymce-advanced/mce/emoticons/plugin.js
Normal file
87
wp-content/plugins/tinymce-advanced/mce/emoticons/plugin.js
Normal file
|
@ -0,0 +1,87 @@
|
|||
/**
|
||||
* plugin.js (edited for WP)
|
||||
*
|
||||
* Copyright, Moxiecode Systems AB
|
||||
* Released under LGPL License.
|
||||
*
|
||||
* License: http://www.tinymce.com/license
|
||||
* Contributing: http://www.tinymce.com/contributing
|
||||
*/
|
||||
|
||||
/*global tinymce:true */
|
||||
|
||||
tinymce.PluginManager.add('emoticons', function(editor, url) {
|
||||
var emoticons = [{
|
||||
smile: ':-)',
|
||||
razz: ':-P',
|
||||
cool: '8-)',
|
||||
wink: ';-)',
|
||||
biggrin: ':-D'
|
||||
},
|
||||
{
|
||||
twisted: ':twisted:',
|
||||
mrgreen: ':mrgreen:',
|
||||
lol: ':lol:',
|
||||
rolleyes: ':roll:',
|
||||
confused: ':-?'
|
||||
},
|
||||
{
|
||||
cry: ':cry:',
|
||||
surprised: ':-o',
|
||||
evil: ':evil:',
|
||||
neutral: ':-|',
|
||||
redface: ':oops:'
|
||||
},
|
||||
{
|
||||
mad: ':-x',
|
||||
eek: '8-O',
|
||||
sad: ':-(',
|
||||
arrow: ':arrow:',
|
||||
idea: ':idea:'
|
||||
}];
|
||||
|
||||
function getHtml() {
|
||||
var emoticonsHtml;
|
||||
|
||||
emoticonsHtml = '<table role="list" class="mce-grid">';
|
||||
|
||||
tinymce.each(emoticons, function( row ) {
|
||||
emoticonsHtml += '<tr>';
|
||||
|
||||
tinymce.each( row, function( icon, name ) {
|
||||
var emoticonUrl = url + '/img/icon_' + name + '.gif';
|
||||
|
||||
emoticonsHtml += '<td><a href="#" data-mce-alt="' + icon + '" tabindex="-1" ' +
|
||||
'role="option" aria-label="' + icon + '"><img src="' +
|
||||
emoticonUrl + '" style="width: 15px; height: 15px; padding: 3px;" role="presentation" alt="' + icon + '" /></a></td>';
|
||||
});
|
||||
|
||||
emoticonsHtml += '</tr>';
|
||||
});
|
||||
|
||||
emoticonsHtml += '</table>';
|
||||
|
||||
return emoticonsHtml;
|
||||
}
|
||||
|
||||
editor.addButton('emoticons', {
|
||||
type: 'panelbutton',
|
||||
panel: {
|
||||
role: 'application',
|
||||
autohide: true,
|
||||
html: getHtml,
|
||||
onclick: function(e) {
|
||||
var linkElm = editor.dom.getParent( e.target, 'a' );
|
||||
|
||||
if ( linkElm ) {
|
||||
editor.insertContent(
|
||||
' ' + linkElm.getAttribute('data-mce-alt') + ' '
|
||||
);
|
||||
|
||||
this.hide();
|
||||
}
|
||||
}
|
||||
},
|
||||
tooltip: 'Emoticons'
|
||||
});
|
||||
});
|
1
wp-content/plugins/tinymce-advanced/mce/emoticons/plugin.min.js
vendored
Normal file
1
wp-content/plugins/tinymce-advanced/mce/emoticons/plugin.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
tinymce.PluginManager.add("emoticons",function(a,b){function c(){var a;return a='<table role="list" class="mce-grid">',tinymce.each(d,function(c){a+="<tr>",tinymce.each(c,function(c,d){var e=b+"/img/icon_"+d+".gif";a+='<td><a href="#" data-mce-alt="'+c+'" tabindex="-1" role="option" aria-label="'+c+'"><img src="'+e+'" style="width: 15px; height: 15px; padding: 3px;" role="presentation" alt="'+c+'" /></a></td>'}),a+="</tr>"}),a+="</table>"}var d=[{smile:":-)",razz:":-P",cool:"8-)",wink:";-)",biggrin:":-D"},{twisted:":twisted:",mrgreen:":mrgreen:",lol:":lol:",rolleyes:":roll:",confused:":-?"},{cry:":cry:",surprised:":-o",evil:":evil:",neutral:":-|",redface:":oops:"},{mad:":-x",eek:"8-O",sad:":-(",arrow:":arrow:",idea:":idea:"}];a.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:c,onclick:function(b){var c=a.dom.getParent(b.target,"a");c&&(a.insertContent(" "+c.getAttribute("data-mce-alt")+" "),this.hide())}},tooltip:"Emoticons"})});
|
264
wp-content/plugins/tinymce-advanced/mce/importcss/plugin.js
Normal file
264
wp-content/plugins/tinymce-advanced/mce/importcss/plugin.js
Normal file
|
@ -0,0 +1,264 @@
|
|||
(function () {
|
||||
var importcss = (function () {
|
||||
'use strict';
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
||||
|
||||
var global$2 = tinymce.util.Tools.resolve('tinymce.EditorManager');
|
||||
|
||||
var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
|
||||
|
||||
var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
var shouldMergeClasses = function (editor) {
|
||||
return editor.getParam('importcss_merge_classes');
|
||||
};
|
||||
var shouldImportExclusive = function (editor) {
|
||||
return editor.getParam('importcss_exclusive');
|
||||
};
|
||||
var getSelectorConverter = function (editor) {
|
||||
return editor.getParam('importcss_selector_converter');
|
||||
};
|
||||
var getSelectorFilter = function (editor) {
|
||||
return editor.getParam('importcss_selector_filter');
|
||||
};
|
||||
var getCssGroups = function (editor) {
|
||||
return editor.getParam('importcss_groups');
|
||||
};
|
||||
var shouldAppend = function (editor) {
|
||||
return editor.getParam('importcss_append');
|
||||
};
|
||||
var getFileFilter = function (editor) {
|
||||
return editor.getParam('importcss_file_filter');
|
||||
};
|
||||
var Settings = {
|
||||
shouldMergeClasses: shouldMergeClasses,
|
||||
shouldImportExclusive: shouldImportExclusive,
|
||||
getSelectorConverter: getSelectorConverter,
|
||||
getSelectorFilter: getSelectorFilter,
|
||||
getCssGroups: getCssGroups,
|
||||
shouldAppend: shouldAppend,
|
||||
getFileFilter: getFileFilter
|
||||
};
|
||||
|
||||
var removeCacheSuffix = function (url) {
|
||||
var cacheSuffix = global$3.cacheSuffix;
|
||||
if (typeof url === 'string') {
|
||||
url = url.replace('?' + cacheSuffix, '').replace('&' + cacheSuffix, '');
|
||||
}
|
||||
return url;
|
||||
};
|
||||
var isSkinContentCss = function (editor, href) {
|
||||
var settings = editor.settings, skin = settings.skin !== false ? settings.skin || 'lightgray' : false;
|
||||
if (skin) {
|
||||
var skinUrl = settings.skin_url ? editor.documentBaseURI.toAbsolute(settings.skin_url) : global$2.baseURL + '/skins/' + skin;
|
||||
return href === skinUrl + '/content' + (editor.inline ? '.inline' : '') + '.min.css';
|
||||
}
|
||||
return false;
|
||||
};
|
||||
var compileFilter = function (filter) {
|
||||
if (typeof filter === 'string') {
|
||||
return function (value) {
|
||||
return value.indexOf(filter) !== -1;
|
||||
};
|
||||
} else if (filter instanceof RegExp) {
|
||||
return function (value) {
|
||||
return filter.test(value);
|
||||
};
|
||||
}
|
||||
return filter;
|
||||
};
|
||||
var getSelectors = function (editor, doc, fileFilter) {
|
||||
var selectors = [], contentCSSUrls = {};
|
||||
function append(styleSheet, imported) {
|
||||
var href = styleSheet.href, rules;
|
||||
href = removeCacheSuffix(href);
|
||||
if (!href || !fileFilter(href, imported) || isSkinContentCss(editor, href)) {
|
||||
return;
|
||||
}
|
||||
global$4.each(styleSheet.imports, function (styleSheet) {
|
||||
append(styleSheet, true);
|
||||
});
|
||||
try {
|
||||
rules = styleSheet.cssRules || styleSheet.rules;
|
||||
} catch (e) {
|
||||
}
|
||||
global$4.each(rules, function (cssRule) {
|
||||
if (cssRule.styleSheet) {
|
||||
append(cssRule.styleSheet, true);
|
||||
} else if (cssRule.selectorText) {
|
||||
global$4.each(cssRule.selectorText.split(','), function (selector) {
|
||||
selectors.push(global$4.trim(selector));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
global$4.each(editor.contentCSS, function (url) {
|
||||
contentCSSUrls[url] = true;
|
||||
});
|
||||
if (!fileFilter) {
|
||||
fileFilter = function (href, imported) {
|
||||
return imported || contentCSSUrls[href];
|
||||
};
|
||||
}
|
||||
try {
|
||||
global$4.each(doc.styleSheets, function (styleSheet) {
|
||||
append(styleSheet);
|
||||
});
|
||||
} catch (e) {
|
||||
}
|
||||
return selectors;
|
||||
};
|
||||
var defaultConvertSelectorToFormat = function (editor, selectorText) {
|
||||
var format;
|
||||
var selector = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(selectorText);
|
||||
if (!selector) {
|
||||
return;
|
||||
}
|
||||
var elementName = selector[1];
|
||||
var classes = selector[2].substr(1).split('.').join(' ');
|
||||
var inlineSelectorElements = global$4.makeMap('a,img');
|
||||
if (selector[1]) {
|
||||
format = { title: selectorText };
|
||||
if (editor.schema.getTextBlockElements()[elementName]) {
|
||||
format.block = elementName;
|
||||
} else if (editor.schema.getBlockElements()[elementName] || inlineSelectorElements[elementName.toLowerCase()]) {
|
||||
format.selector = elementName;
|
||||
} else {
|
||||
format.inline = elementName;
|
||||
}
|
||||
} else if (selector[2]) {
|
||||
format = {
|
||||
inline: 'span',
|
||||
title: selectorText.substr(1),
|
||||
classes: classes
|
||||
};
|
||||
}
|
||||
if (Settings.shouldMergeClasses(editor) !== false) {
|
||||
format.classes = classes;
|
||||
} else {
|
||||
format.attributes = { class: classes };
|
||||
}
|
||||
return format;
|
||||
};
|
||||
var getGroupsBySelector = function (groups, selector) {
|
||||
return global$4.grep(groups, function (group) {
|
||||
return !group.filter || group.filter(selector);
|
||||
});
|
||||
};
|
||||
var compileUserDefinedGroups = function (groups) {
|
||||
return global$4.map(groups, function (group) {
|
||||
return global$4.extend({}, group, {
|
||||
original: group,
|
||||
selectors: {},
|
||||
filter: compileFilter(group.filter),
|
||||
item: {
|
||||
text: group.title,
|
||||
menu: []
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
var isExclusiveMode = function (editor, group) {
|
||||
return group === null || Settings.shouldImportExclusive(editor) !== false;
|
||||
};
|
||||
var isUniqueSelector = function (editor, selector, group, globallyUniqueSelectors) {
|
||||
return !(isExclusiveMode(editor, group) ? selector in globallyUniqueSelectors : selector in group.selectors);
|
||||
};
|
||||
var markUniqueSelector = function (editor, selector, group, globallyUniqueSelectors) {
|
||||
if (isExclusiveMode(editor, group)) {
|
||||
globallyUniqueSelectors[selector] = true;
|
||||
} else {
|
||||
group.selectors[selector] = true;
|
||||
}
|
||||
};
|
||||
var convertSelectorToFormat = function (editor, plugin, selector, group) {
|
||||
var selectorConverter;
|
||||
if (group && group.selector_converter) {
|
||||
selectorConverter = group.selector_converter;
|
||||
} else if (Settings.getSelectorConverter(editor)) {
|
||||
selectorConverter = Settings.getSelectorConverter(editor);
|
||||
} else {
|
||||
selectorConverter = function () {
|
||||
return defaultConvertSelectorToFormat(editor, selector);
|
||||
};
|
||||
}
|
||||
return selectorConverter.call(plugin, selector, group);
|
||||
};
|
||||
var setup = function (editor) {
|
||||
editor.on('renderFormatsMenu', function (e) {
|
||||
var globallyUniqueSelectors = {};
|
||||
var selectorFilter = compileFilter(Settings.getSelectorFilter(editor)), ctrl = e.control;
|
||||
var groups = compileUserDefinedGroups(Settings.getCssGroups(editor));
|
||||
var processSelector = function (selector, group) {
|
||||
if (isUniqueSelector(editor, selector, group, globallyUniqueSelectors)) {
|
||||
markUniqueSelector(editor, selector, group, globallyUniqueSelectors);
|
||||
var format = convertSelectorToFormat(editor, editor.plugins.importcss, selector, group);
|
||||
if (format) {
|
||||
var formatName = format.name || global$1.DOM.uniqueId();
|
||||
editor.formatter.register(formatName, format);
|
||||
return global$4.extend({}, ctrl.settings.itemDefaults, {
|
||||
text: format.title,
|
||||
format: formatName
|
||||
});
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
if (!Settings.shouldAppend(editor)) {
|
||||
ctrl.items().remove();
|
||||
}
|
||||
global$4.each(getSelectors(editor, e.doc || editor.getDoc(), compileFilter(Settings.getFileFilter(editor))), function (selector) {
|
||||
if (selector.indexOf('.mce-') === -1) {
|
||||
if (!selectorFilter || selectorFilter(selector)) {
|
||||
var selectorGroups = getGroupsBySelector(groups, selector);
|
||||
if (selectorGroups.length > 0) {
|
||||
global$4.each(selectorGroups, function (group) {
|
||||
var menuItem = processSelector(selector, group);
|
||||
if (menuItem) {
|
||||
group.item.menu.push(menuItem);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var menuItem = processSelector(selector, null);
|
||||
if (menuItem) {
|
||||
ctrl.add(menuItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
global$4.each(groups, function (group) {
|
||||
if (group.item.menu.length > 0) {
|
||||
ctrl.add(group.item);
|
||||
}
|
||||
});
|
||||
e.control.renderNew();
|
||||
});
|
||||
};
|
||||
var ImportCss = {
|
||||
defaultConvertSelectorToFormat: defaultConvertSelectorToFormat,
|
||||
setup: setup
|
||||
};
|
||||
|
||||
var get = function (editor) {
|
||||
var convertSelectorToFormat = function (selectorText) {
|
||||
return ImportCss.defaultConvertSelectorToFormat(editor, selectorText);
|
||||
};
|
||||
return { convertSelectorToFormat: convertSelectorToFormat };
|
||||
};
|
||||
var Api = { get: get };
|
||||
|
||||
global.add('importcss', function (editor) {
|
||||
ImportCss.setup(editor);
|
||||
return Api.get(editor);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return Plugin;
|
||||
|
||||
}());
|
||||
})();
|
1
wp-content/plugins/tinymce-advanced/mce/importcss/plugin.min.js
vendored
Normal file
1
wp-content/plugins/tinymce-advanced/mce/importcss/plugin.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),v=tinymce.util.Tools.resolve("tinymce.EditorManager"),h=tinymce.util.Tools.resolve("tinymce.Env"),y=tinymce.util.Tools.resolve("tinymce.util.Tools"),o=function(e){return e.getParam("importcss_merge_classes")},n=function(e){return e.getParam("importcss_exclusive")},_=function(e){return e.getParam("importcss_selector_converter")},r=function(e){return e.getParam("importcss_selector_filter")},i=function(e){return e.getParam("importcss_groups")},u=function(e){return e.getParam("importcss_append")},l=function(e){return e.getParam("importcss_file_filter")},a=function(t){return"string"==typeof t?function(e){return-1!==e.indexOf(t)}:t instanceof RegExp?function(e){return t.test(e)}:t},f=function(f,e,m){var g=[],n={};function p(e,t){var n,r,i,c=e.href;if(r=c,i=h.cacheSuffix,"string"==typeof r&&(r=r.replace("?"+i,"").replace("&"+i,"")),(c=r)&&m(c,t)&&(o=c,u=(s=f).settings,!(l=!1!==u.skin&&(u.skin||"lightgray"))||o!==(u.skin_url?s.documentBaseURI.toAbsolute(u.skin_url):v.baseURL+"/skins/"+l)+"/content"+(s.inline?".inline":"")+".min.css")){var s,o,u,l;y.each(e.imports,function(e){p(e,!0)});try{n=e.cssRules||e.rules}catch(a){}y.each(n,function(e){e.styleSheet?p(e.styleSheet,!0):e.selectorText&&y.each(e.selectorText.split(","),function(e){g.push(y.trim(e))})})}}y.each(f.contentCSS,function(e){n[e]=!0}),m||(m=function(e,t){return t||n[e]});try{y.each(e.styleSheets,function(e){p(e)})}catch(t){}return g},x=function(e,t){var n,r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(r){var i=r[1],c=r[2].substr(1).split(".").join(" "),s=y.makeMap("a,img");return r[1]?(n={title:t},e.schema.getTextBlockElements()[i]?n.block=i:e.schema.getBlockElements()[i]||s[i.toLowerCase()]?n.selector=i:n.inline=i):r[2]&&(n={inline:"span",title:t.substr(1),classes:c}),!1!==o(e)?n.classes=c:n.attributes={"class":c},n}},T=function(e,t){return null===t||!1!==n(e)},c=x,t=function(h){h.on("renderFormatsMenu",function(e){var t,p={},c=a(r(h)),v=e.control,s=(t=i(h),y.map(t,function(e){return y.extend({},e,{original:e,selectors:{},filter:a(e.filter),item:{text:e.title,menu:[]}})})),o=function(e,t){if(f=e,g=p,!(T(h,m=t)?f in g:f in m.selectors)){u=e,a=p,T(h,l=t)?a[u]=!0:l.selectors[u]=!0;var n=(c=(i=h).plugins.importcss,s=e,((o=t)&&o.selector_converter?o.selector_converter:_(i)?_(i):function(){return x(i,s)}).call(c,s,o));if(n){var r=n.name||d.DOM.uniqueId();return h.formatter.register(r,n),y.extend({},v.settings.itemDefaults,{text:n.title,format:r})}}var i,c,s,o,u,l,a,f,m,g;return null};u(h)||v.items().remove(),y.each(f(h,e.doc||h.getDoc(),a(l(h))),function(n){if(-1===n.indexOf(".mce-")&&(!c||c(n))){var e=(r=s,i=n,y.grep(r,function(e){return!e.filter||e.filter(i)}));if(0<e.length)y.each(e,function(e){var t=o(n,e);t&&e.item.menu.push(t)});else{var t=o(n,null);t&&v.add(t)}}var r,i}),y.each(s,function(e){0<e.item.menu.length&&v.add(e.item)}),e.control.renderNew()})},s=function(t){return{convertSelectorToFormat:function(e){return c(t,e)}}};e.add("importcss",function(e){return t(e),s(e)})}();
|
173
wp-content/plugins/tinymce-advanced/mce/insertdatetime/plugin.js
Normal file
173
wp-content/plugins/tinymce-advanced/mce/insertdatetime/plugin.js
Normal file
|
@ -0,0 +1,173 @@
|
|||
(function () {
|
||||
var insertdatetime = (function () {
|
||||
'use strict';
|
||||
|
||||
var Cell = function (initial) {
|
||||
var value = initial;
|
||||
var get = function () {
|
||||
return value;
|
||||
};
|
||||
var set = function (v) {
|
||||
value = v;
|
||||
};
|
||||
var clone = function () {
|
||||
return Cell(get());
|
||||
};
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
clone: clone
|
||||
};
|
||||
};
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
var getDateFormat = function (editor) {
|
||||
return editor.getParam('insertdatetime_dateformat', editor.translate('%Y-%m-%d'));
|
||||
};
|
||||
var getTimeFormat = function (editor) {
|
||||
return editor.getParam('insertdatetime_timeformat', editor.translate('%H:%M:%S'));
|
||||
};
|
||||
var getFormats = function (editor) {
|
||||
return editor.getParam('insertdatetime_formats', [
|
||||
'%H:%M:%S',
|
||||
'%Y-%m-%d',
|
||||
'%I:%M:%S %p',
|
||||
'%D'
|
||||
]);
|
||||
};
|
||||
var getDefaultDateTime = function (editor) {
|
||||
var formats = getFormats(editor);
|
||||
return formats.length > 0 ? formats[0] : getTimeFormat(editor);
|
||||
};
|
||||
var shouldInsertTimeElement = function (editor) {
|
||||
return editor.getParam('insertdatetime_element', false);
|
||||
};
|
||||
var Settings = {
|
||||
getDateFormat: getDateFormat,
|
||||
getTimeFormat: getTimeFormat,
|
||||
getFormats: getFormats,
|
||||
getDefaultDateTime: getDefaultDateTime,
|
||||
shouldInsertTimeElement: shouldInsertTimeElement
|
||||
};
|
||||
|
||||
var daysShort = 'Sun Mon Tue Wed Thu Fri Sat Sun'.split(' ');
|
||||
var daysLong = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split(' ');
|
||||
var monthsShort = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
|
||||
var monthsLong = 'January February March April May June July August September October November December'.split(' ');
|
||||
var addZeros = function (value, len) {
|
||||
value = '' + value;
|
||||
if (value.length < len) {
|
||||
for (var i = 0; i < len - value.length; i++) {
|
||||
value = '0' + value;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
};
|
||||
var getDateTime = function (editor, fmt, date) {
|
||||
date = date || new Date();
|
||||
fmt = fmt.replace('%D', '%m/%d/%Y');
|
||||
fmt = fmt.replace('%r', '%I:%M:%S %p');
|
||||
fmt = fmt.replace('%Y', '' + date.getFullYear());
|
||||
fmt = fmt.replace('%y', '' + date.getYear());
|
||||
fmt = fmt.replace('%m', addZeros(date.getMonth() + 1, 2));
|
||||
fmt = fmt.replace('%d', addZeros(date.getDate(), 2));
|
||||
fmt = fmt.replace('%H', '' + addZeros(date.getHours(), 2));
|
||||
fmt = fmt.replace('%M', '' + addZeros(date.getMinutes(), 2));
|
||||
fmt = fmt.replace('%S', '' + addZeros(date.getSeconds(), 2));
|
||||
fmt = fmt.replace('%I', '' + ((date.getHours() + 11) % 12 + 1));
|
||||
fmt = fmt.replace('%p', '' + (date.getHours() < 12 ? 'AM' : 'PM'));
|
||||
fmt = fmt.replace('%B', '' + editor.translate(monthsLong[date.getMonth()]));
|
||||
fmt = fmt.replace('%b', '' + editor.translate(monthsShort[date.getMonth()]));
|
||||
fmt = fmt.replace('%A', '' + editor.translate(daysLong[date.getDay()]));
|
||||
fmt = fmt.replace('%a', '' + editor.translate(daysShort[date.getDay()]));
|
||||
fmt = fmt.replace('%%', '%');
|
||||
return fmt;
|
||||
};
|
||||
var updateElement = function (editor, timeElm, computerTime, userTime) {
|
||||
var newTimeElm = editor.dom.create('time', { datetime: computerTime }, userTime);
|
||||
timeElm.parentNode.insertBefore(newTimeElm, timeElm);
|
||||
editor.dom.remove(timeElm);
|
||||
editor.selection.select(newTimeElm, true);
|
||||
editor.selection.collapse(false);
|
||||
};
|
||||
var insertDateTime = function (editor, format) {
|
||||
if (Settings.shouldInsertTimeElement(editor)) {
|
||||
var userTime = getDateTime(editor, format);
|
||||
var computerTime = void 0;
|
||||
if (/%[HMSIp]/.test(format)) {
|
||||
computerTime = getDateTime(editor, '%Y-%m-%dT%H:%M');
|
||||
} else {
|
||||
computerTime = getDateTime(editor, '%Y-%m-%d');
|
||||
}
|
||||
var timeElm = editor.dom.getParent(editor.selection.getStart(), 'time');
|
||||
if (timeElm) {
|
||||
updateElement(editor, timeElm, computerTime, userTime);
|
||||
} else {
|
||||
editor.insertContent('<time datetime="' + computerTime + '">' + userTime + '</time>');
|
||||
}
|
||||
} else {
|
||||
editor.insertContent(getDateTime(editor, format));
|
||||
}
|
||||
};
|
||||
var Actions = {
|
||||
insertDateTime: insertDateTime,
|
||||
getDateTime: getDateTime
|
||||
};
|
||||
|
||||
var register = function (editor) {
|
||||
editor.addCommand('mceInsertDate', function () {
|
||||
Actions.insertDateTime(editor, Settings.getDateFormat(editor));
|
||||
});
|
||||
editor.addCommand('mceInsertTime', function () {
|
||||
Actions.insertDateTime(editor, Settings.getTimeFormat(editor));
|
||||
});
|
||||
};
|
||||
var Commands = { register: register };
|
||||
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
var createMenuItems = function (editor, lastFormatState) {
|
||||
var formats = Settings.getFormats(editor);
|
||||
return global$1.map(formats, function (fmt) {
|
||||
return {
|
||||
text: Actions.getDateTime(editor, fmt),
|
||||
onclick: function () {
|
||||
lastFormatState.set(fmt);
|
||||
Actions.insertDateTime(editor, fmt);
|
||||
}
|
||||
};
|
||||
});
|
||||
};
|
||||
var register$1 = function (editor, lastFormatState) {
|
||||
var menuItems = createMenuItems(editor, lastFormatState);
|
||||
editor.addButton('insertdatetime', {
|
||||
type: 'splitbutton',
|
||||
title: 'Insert date/time',
|
||||
menu: menuItems,
|
||||
onclick: function () {
|
||||
var lastFormat = lastFormatState.get();
|
||||
Actions.insertDateTime(editor, lastFormat ? lastFormat : Settings.getDefaultDateTime(editor));
|
||||
}
|
||||
});
|
||||
editor.addMenuItem('insertdatetime', {
|
||||
icon: 'date',
|
||||
text: 'Date/time',
|
||||
menu: menuItems,
|
||||
context: 'insert'
|
||||
});
|
||||
};
|
||||
var Buttons = { register: register$1 };
|
||||
|
||||
global.add('insertdatetime', function (editor) {
|
||||
var lastFormatState = Cell(null);
|
||||
Commands.register(editor);
|
||||
Buttons.register(editor, lastFormatState);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return Plugin;
|
||||
|
||||
}());
|
||||
})();
|
1
wp-content/plugins/tinymce-advanced/mce/insertdatetime/plugin.min.js
vendored
Normal file
1
wp-content/plugins/tinymce-advanced/mce/insertdatetime/plugin.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=function(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))},a=function(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},t=function(e){return e.getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d"))},i=n,o=a,u=function(e){var t=a(e);return 0<t.length?t[0]:n(e)},m=function(e){return e.getParam("insertdatetime_element",!1)},c="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),l="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),s="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),d="January February March April May June July August September October November December".split(" "),p=function(e,t){if((e=""+e).length<t)for(var n=0;n<t-e.length;n++)e="0"+e;return e},f=function(e,t,n){return n=n||new Date,t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",p(n.getMonth()+1,2))).replace("%d",p(n.getDate(),2))).replace("%H",""+p(n.getHours(),2))).replace("%M",""+p(n.getMinutes(),2))).replace("%S",""+p(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(d[n.getMonth()]))).replace("%b",""+e.translate(s[n.getMonth()]))).replace("%A",""+e.translate(l[n.getDay()]))).replace("%a",""+e.translate(c[n.getDay()]))).replace("%%","%")},g=function(e,t){if(m(e)){var n=f(e,t),r=void 0;r=/%[HMSIp]/.test(t)?f(e,"%Y-%m-%dT%H:%M"):f(e,"%Y-%m-%d");var a=e.dom.getParent(e.selection.getStart(),"time");a?(o=a,u=r,c=n,l=(i=e).dom.create("time",{datetime:u},c),o.parentNode.insertBefore(l,o),i.dom.remove(o),i.selection.select(l,!0),i.selection.collapse(!1)):e.insertContent('<time datetime="'+r+'">'+n+"</time>")}else e.insertContent(f(e,t));var i,o,u,c,l},y=f,M=function(e){e.addCommand("mceInsertDate",function(){g(e,t(e))}),e.addCommand("mceInsertTime",function(){g(e,i(e))})},v=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=function(t,n){var r,a,e,i=(a=n,e=o(r=t),v.map(e,function(e){return{text:y(r,e),onclick:function(){a.set(e),g(r,e)}}}));t.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",menu:i,onclick:function(){var e=n.get();g(t,e||u(t))}}),t.addMenuItem("insertdatetime",{icon:"date",text:"Date/time",menu:i,context:"insert"})};e.add("insertdatetime",function(e){var t=r(null);M(e),S(e,t)})}();
|
713
wp-content/plugins/tinymce-advanced/mce/link/plugin.js
Normal file
713
wp-content/plugins/tinymce-advanced/mce/link/plugin.js
Normal file
|
@ -0,0 +1,713 @@
|
|||
(function () {
|
||||
var link = (function (domGlobals) {
|
||||
'use strict';
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.util.VK');
|
||||
|
||||
var assumeExternalTargets = function (editorSettings) {
|
||||
return typeof editorSettings.link_assume_external_targets === 'boolean' ? editorSettings.link_assume_external_targets : false;
|
||||
};
|
||||
var hasContextToolbar = function (editorSettings) {
|
||||
return typeof editorSettings.link_context_toolbar === 'boolean' ? editorSettings.link_context_toolbar : false;
|
||||
};
|
||||
var getLinkList = function (editorSettings) {
|
||||
return editorSettings.link_list;
|
||||
};
|
||||
var hasDefaultLinkTarget = function (editorSettings) {
|
||||
return typeof editorSettings.default_link_target === 'string';
|
||||
};
|
||||
var getDefaultLinkTarget = function (editorSettings) {
|
||||
return editorSettings.default_link_target;
|
||||
};
|
||||
var getTargetList = function (editorSettings) {
|
||||
return editorSettings.target_list;
|
||||
};
|
||||
var setTargetList = function (editor, list) {
|
||||
editor.settings.target_list = list;
|
||||
};
|
||||
var shouldShowTargetList = function (editorSettings) {
|
||||
return getTargetList(editorSettings) !== false;
|
||||
};
|
||||
var getRelList = function (editorSettings) {
|
||||
return editorSettings.rel_list;
|
||||
};
|
||||
var hasRelList = function (editorSettings) {
|
||||
return getRelList(editorSettings) !== undefined;
|
||||
};
|
||||
var getLinkClassList = function (editorSettings) {
|
||||
return editorSettings.link_class_list;
|
||||
};
|
||||
var hasLinkClassList = function (editorSettings) {
|
||||
return getLinkClassList(editorSettings) !== undefined;
|
||||
};
|
||||
var shouldShowLinkTitle = function (editorSettings) {
|
||||
return editorSettings.link_title !== false;
|
||||
};
|
||||
var allowUnsafeLinkTarget = function (editorSettings) {
|
||||
return typeof editorSettings.allow_unsafe_link_target === 'boolean' ? editorSettings.allow_unsafe_link_target : false;
|
||||
};
|
||||
var Settings = {
|
||||
assumeExternalTargets: assumeExternalTargets,
|
||||
hasContextToolbar: hasContextToolbar,
|
||||
getLinkList: getLinkList,
|
||||
hasDefaultLinkTarget: hasDefaultLinkTarget,
|
||||
getDefaultLinkTarget: getDefaultLinkTarget,
|
||||
getTargetList: getTargetList,
|
||||
setTargetList: setTargetList,
|
||||
shouldShowTargetList: shouldShowTargetList,
|
||||
getRelList: getRelList,
|
||||
hasRelList: hasRelList,
|
||||
getLinkClassList: getLinkClassList,
|
||||
hasLinkClassList: hasLinkClassList,
|
||||
shouldShowLinkTitle: shouldShowLinkTitle,
|
||||
allowUnsafeLinkTarget: allowUnsafeLinkTarget
|
||||
};
|
||||
|
||||
var global$2 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
||||
|
||||
var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
|
||||
|
||||
var appendClickRemove = function (link, evt) {
|
||||
domGlobals.document.body.appendChild(link);
|
||||
link.dispatchEvent(evt);
|
||||
domGlobals.document.body.removeChild(link);
|
||||
};
|
||||
var open = function (url) {
|
||||
if (!global$3.ie || global$3.ie > 10) {
|
||||
var link = domGlobals.document.createElement('a');
|
||||
link.target = '_blank';
|
||||
link.href = url;
|
||||
link.rel = 'noreferrer noopener';
|
||||
var evt = domGlobals.document.createEvent('MouseEvents');
|
||||
evt.initMouseEvent('click', true, true, domGlobals.window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
|
||||
appendClickRemove(link, evt);
|
||||
} else {
|
||||
var win = domGlobals.window.open('', '_blank');
|
||||
if (win) {
|
||||
win.opener = null;
|
||||
var doc = win.document;
|
||||
doc.open();
|
||||
doc.write('<meta http-equiv="refresh" content="0; url=' + global$2.DOM.encode(url) + '">');
|
||||
doc.close();
|
||||
}
|
||||
}
|
||||
};
|
||||
var OpenUrl = { open: open };
|
||||
|
||||
var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
var toggleTargetRules = function (rel, isUnsafe) {
|
||||
var rules = ['noopener'];
|
||||
var newRel = rel ? rel.split(/\s+/) : [];
|
||||
var toString = function (rel) {
|
||||
return global$4.trim(rel.sort().join(' '));
|
||||
};
|
||||
var addTargetRules = function (rel) {
|
||||
rel = removeTargetRules(rel);
|
||||
return rel.length ? rel.concat(rules) : rules;
|
||||
};
|
||||
var removeTargetRules = function (rel) {
|
||||
return rel.filter(function (val) {
|
||||
return global$4.inArray(rules, val) === -1;
|
||||
});
|
||||
};
|
||||
newRel = isUnsafe ? addTargetRules(newRel) : removeTargetRules(newRel);
|
||||
return newRel.length ? toString(newRel) : null;
|
||||
};
|
||||
var trimCaretContainers = function (text) {
|
||||
return text.replace(/\uFEFF/g, '');
|
||||
};
|
||||
var getAnchorElement = function (editor, selectedElm) {
|
||||
selectedElm = selectedElm || editor.selection.getNode();
|
||||
if (isImageFigure(selectedElm)) {
|
||||
return editor.dom.select('a[href]', selectedElm)[0];
|
||||
} else {
|
||||
return editor.dom.getParent(selectedElm, 'a[href]');
|
||||
}
|
||||
};
|
||||
var getAnchorText = function (selection, anchorElm) {
|
||||
var text = anchorElm ? anchorElm.innerText || anchorElm.textContent : selection.getContent({ format: 'text' });
|
||||
return trimCaretContainers(text);
|
||||
};
|
||||
var isLink = function (elm) {
|
||||
return elm && elm.nodeName === 'A' && elm.href;
|
||||
};
|
||||
var hasLinks = function (elements) {
|
||||
return global$4.grep(elements, isLink).length > 0;
|
||||
};
|
||||
var isOnlyTextSelected = function (html) {
|
||||
if (/</.test(html) && (!/^<a [^>]+>[^<]+<\/a>$/.test(html) || html.indexOf('href=') === -1)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
var isImageFigure = function (node) {
|
||||
return node && node.nodeName === 'FIGURE' && /\bimage\b/i.test(node.className);
|
||||
};
|
||||
var link = function (editor, attachState) {
|
||||
return function (data) {
|
||||
editor.undoManager.transact(function () {
|
||||
var selectedElm = editor.selection.getNode();
|
||||
var anchorElm = getAnchorElement(editor, selectedElm);
|
||||
var linkAttrs = {
|
||||
href: data.href,
|
||||
target: data.target ? data.target : null,
|
||||
rel: data.rel ? data.rel : null,
|
||||
class: data.class ? data.class : null,
|
||||
title: data.title ? data.title : null
|
||||
};
|
||||
if (!Settings.hasRelList(editor.settings) && Settings.allowUnsafeLinkTarget(editor.settings) === false) {
|
||||
linkAttrs.rel = toggleTargetRules(linkAttrs.rel, linkAttrs.target === '_blank');
|
||||
}
|
||||
if (data.href === attachState.href) {
|
||||
attachState.attach();
|
||||
attachState = {};
|
||||
}
|
||||
if (anchorElm) {
|
||||
editor.focus();
|
||||
if (data.hasOwnProperty('text')) {
|
||||
if ('innerText' in anchorElm) {
|
||||
anchorElm.innerText = data.text;
|
||||
} else {
|
||||
anchorElm.textContent = data.text;
|
||||
}
|
||||
}
|
||||
editor.dom.setAttribs(anchorElm, linkAttrs);
|
||||
editor.selection.select(anchorElm);
|
||||
editor.undoManager.add();
|
||||
} else {
|
||||
if (isImageFigure(selectedElm)) {
|
||||
linkImageFigure(editor, selectedElm, linkAttrs);
|
||||
} else if (data.hasOwnProperty('text')) {
|
||||
editor.insertContent(editor.dom.createHTML('a', linkAttrs, editor.dom.encode(data.text)));
|
||||
} else {
|
||||
editor.execCommand('mceInsertLink', false, linkAttrs);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
var unlink = function (editor) {
|
||||
return function () {
|
||||
editor.undoManager.transact(function () {
|
||||
var node = editor.selection.getNode();
|
||||
if (isImageFigure(node)) {
|
||||
unlinkImageFigure(editor, node);
|
||||
} else {
|
||||
editor.execCommand('unlink');
|
||||
}
|
||||
});
|
||||
};
|
||||
};
|
||||
var unlinkImageFigure = function (editor, fig) {
|
||||
var a, img;
|
||||
img = editor.dom.select('img', fig)[0];
|
||||
if (img) {
|
||||
a = editor.dom.getParents(img, 'a[href]', fig)[0];
|
||||
if (a) {
|
||||
a.parentNode.insertBefore(img, a);
|
||||
editor.dom.remove(a);
|
||||
}
|
||||
}
|
||||
};
|
||||
var linkImageFigure = function (editor, fig, attrs) {
|
||||
var a, img;
|
||||
img = editor.dom.select('img', fig)[0];
|
||||
if (img) {
|
||||
a = editor.dom.create('a', attrs);
|
||||
img.parentNode.insertBefore(a, img);
|
||||
a.appendChild(img);
|
||||
}
|
||||
};
|
||||
var Utils = {
|
||||
link: link,
|
||||
unlink: unlink,
|
||||
isLink: isLink,
|
||||
hasLinks: hasLinks,
|
||||
isOnlyTextSelected: isOnlyTextSelected,
|
||||
getAnchorElement: getAnchorElement,
|
||||
getAnchorText: getAnchorText,
|
||||
toggleTargetRules: toggleTargetRules
|
||||
};
|
||||
|
||||
var global$5 = tinymce.util.Tools.resolve('tinymce.util.Delay');
|
||||
|
||||
var global$6 = tinymce.util.Tools.resolve('tinymce.util.XHR');
|
||||
|
||||
var attachState = {};
|
||||
var createLinkList = function (editor, callback) {
|
||||
var linkList = Settings.getLinkList(editor.settings);
|
||||
if (typeof linkList === 'string') {
|
||||
global$6.send({
|
||||
url: linkList,
|
||||
success: function (text) {
|
||||
callback(editor, JSON.parse(text));
|
||||
}
|
||||
});
|
||||
} else if (typeof linkList === 'function') {
|
||||
linkList(function (list) {
|
||||
callback(editor, list);
|
||||
});
|
||||
} else {
|
||||
callback(editor, linkList);
|
||||
}
|
||||
};
|
||||
var buildListItems = function (inputList, itemCallback, startItems) {
|
||||
var appendItems = function (values, output) {
|
||||
output = output || [];
|
||||
global$4.each(values, function (item) {
|
||||
var menuItem = { text: item.text || item.title };
|
||||
if (item.menu) {
|
||||
menuItem.menu = appendItems(item.menu);
|
||||
} else {
|
||||
menuItem.value = item.value;
|
||||
if (itemCallback) {
|
||||
itemCallback(menuItem);
|
||||
}
|
||||
}
|
||||
output.push(menuItem);
|
||||
});
|
||||
return output;
|
||||
};
|
||||
return appendItems(inputList, startItems || []);
|
||||
};
|
||||
var delayedConfirm = function (editor, message, callback) {
|
||||
var rng = editor.selection.getRng();
|
||||
global$5.setEditorTimeout(editor, function () {
|
||||
editor.windowManager.confirm(message, function (state) {
|
||||
editor.selection.setRng(rng);
|
||||
callback(state);
|
||||
});
|
||||
});
|
||||
};
|
||||
var showDialog = function (editor, linkList) {
|
||||
var data = {};
|
||||
var selection = editor.selection;
|
||||
var dom = editor.dom;
|
||||
var anchorElm, initialText;
|
||||
var win, onlyText, textListCtrl, linkListCtrl, relListCtrl, targetListCtrl, classListCtrl, linkTitleCtrl, value;
|
||||
var linkListChangeHandler = function (e) {
|
||||
var textCtrl = win.find('#text');
|
||||
if (!textCtrl.value() || e.lastControl && textCtrl.value() === e.lastControl.text()) {
|
||||
textCtrl.value(e.control.text());
|
||||
}
|
||||
win.find('#href').value(e.control.value());
|
||||
};
|
||||
var buildAnchorListControl = function (url) {
|
||||
var anchorList = [];
|
||||
global$4.each(editor.dom.select('a:not([href])'), function (anchor) {
|
||||
var id = anchor.name || anchor.id;
|
||||
if (id) {
|
||||
anchorList.push({
|
||||
text: id,
|
||||
value: '#' + id,
|
||||
selected: url.indexOf('#' + id) !== -1
|
||||
});
|
||||
}
|
||||
});
|
||||
if (anchorList.length) {
|
||||
anchorList.unshift({
|
||||
text: 'None',
|
||||
value: ''
|
||||
});
|
||||
return {
|
||||
name: 'anchor',
|
||||
type: 'listbox',
|
||||
label: 'Anchors',
|
||||
values: anchorList,
|
||||
onselect: linkListChangeHandler
|
||||
};
|
||||
}
|
||||
};
|
||||
var updateText = function () {
|
||||
if (!initialText && onlyText && !data.text) {
|
||||
this.parent().parent().find('#text')[0].value(this.value());
|
||||
}
|
||||
};
|
||||
var urlChange = function (e) {
|
||||
var meta = e.meta || {};
|
||||
if (linkListCtrl) {
|
||||
linkListCtrl.value(editor.convertURL(this.value(), 'href'));
|
||||
}
|
||||
global$4.each(e.meta, function (value, key) {
|
||||
var inp = win.find('#' + key);
|
||||
if (key === 'text') {
|
||||
if (initialText.length === 0) {
|
||||
inp.value(value);
|
||||
data.text = value;
|
||||
}
|
||||
} else {
|
||||
inp.value(value);
|
||||
}
|
||||
});
|
||||
if (meta.attach) {
|
||||
attachState = {
|
||||
href: this.value(),
|
||||
attach: meta.attach
|
||||
};
|
||||
}
|
||||
if (!meta.text) {
|
||||
updateText.call(this);
|
||||
}
|
||||
};
|
||||
var onBeforeCall = function (e) {
|
||||
e.meta = win.toJSON();
|
||||
};
|
||||
onlyText = Utils.isOnlyTextSelected(selection.getContent());
|
||||
anchorElm = Utils.getAnchorElement(editor);
|
||||
data.text = initialText = Utils.getAnchorText(editor.selection, anchorElm);
|
||||
data.href = anchorElm ? dom.getAttrib(anchorElm, 'href') : '';
|
||||
if (anchorElm) {
|
||||
data.target = dom.getAttrib(anchorElm, 'target');
|
||||
} else if (Settings.hasDefaultLinkTarget(editor.settings)) {
|
||||
data.target = Settings.getDefaultLinkTarget(editor.settings);
|
||||
}
|
||||
if (value = dom.getAttrib(anchorElm, 'rel')) {
|
||||
data.rel = value;
|
||||
}
|
||||
if (value = dom.getAttrib(anchorElm, 'class')) {
|
||||
data.class = value;
|
||||
}
|
||||
if (value = dom.getAttrib(anchorElm, 'title')) {
|
||||
data.title = value;
|
||||
}
|
||||
if (onlyText) {
|
||||
textListCtrl = {
|
||||
name: 'text',
|
||||
type: 'textbox',
|
||||
size: 40,
|
||||
label: 'Text to display',
|
||||
onchange: function () {
|
||||
data.text = this.value();
|
||||
}
|
||||
};
|
||||
}
|
||||
if (linkList) {
|
||||
linkListCtrl = {
|
||||
type: 'listbox',
|
||||
label: 'Link list',
|
||||
values: buildListItems(linkList, function (item) {
|
||||
item.value = editor.convertURL(item.value || item.url, 'href');
|
||||
}, [{
|
||||
text: 'None',
|
||||
value: ''
|
||||
}]),
|
||||
onselect: linkListChangeHandler,
|
||||
value: editor.convertURL(data.href, 'href'),
|
||||
onPostRender: function () {
|
||||
linkListCtrl = this;
|
||||
}
|
||||
};
|
||||
}
|
||||
if (Settings.shouldShowTargetList(editor.settings)) {
|
||||
if (Settings.getTargetList(editor.settings) === undefined) {
|
||||
Settings.setTargetList(editor, [
|
||||
{
|
||||
text: 'None',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
text: 'New window',
|
||||
value: '_blank'
|
||||
}
|
||||
]);
|
||||
}
|
||||
targetListCtrl = {
|
||||
name: 'target',
|
||||
type: 'listbox',
|
||||
label: 'Target',
|
||||
values: buildListItems(Settings.getTargetList(editor.settings))
|
||||
};
|
||||
}
|
||||
if (Settings.hasRelList(editor.settings)) {
|
||||
relListCtrl = {
|
||||
name: 'rel',
|
||||
type: 'listbox',
|
||||
label: 'Rel',
|
||||
values: buildListItems(Settings.getRelList(editor.settings), function (item) {
|
||||
if (Settings.allowUnsafeLinkTarget(editor.settings) === false) {
|
||||
item.value = Utils.toggleTargetRules(item.value, data.target === '_blank');
|
||||
}
|
||||
})
|
||||
};
|
||||
}
|
||||
if (Settings.hasLinkClassList(editor.settings)) {
|
||||
classListCtrl = {
|
||||
name: 'class',
|
||||
type: 'listbox',
|
||||
label: 'Class',
|
||||
values: buildListItems(Settings.getLinkClassList(editor.settings), function (item) {
|
||||
if (item.value) {
|
||||
item.textStyle = function () {
|
||||
return editor.formatter.getCssText({
|
||||
inline: 'a',
|
||||
classes: [item.value]
|
||||
});
|
||||
};
|
||||
}
|
||||
})
|
||||
};
|
||||
}
|
||||
if (Settings.shouldShowLinkTitle(editor.settings)) {
|
||||
linkTitleCtrl = {
|
||||
name: 'title',
|
||||
type: 'textbox',
|
||||
label: 'Title',
|
||||
value: data.title
|
||||
};
|
||||
}
|
||||
win = editor.windowManager.open({
|
||||
title: 'Insert link',
|
||||
data: data,
|
||||
body: [
|
||||
{
|
||||
name: 'href',
|
||||
type: 'filepicker',
|
||||
filetype: 'file',
|
||||
size: 40,
|
||||
autofocus: true,
|
||||
label: 'Url',
|
||||
onchange: urlChange,
|
||||
onkeyup: updateText,
|
||||
onpaste: updateText,
|
||||
onbeforecall: onBeforeCall
|
||||
},
|
||||
textListCtrl,
|
||||
linkTitleCtrl,
|
||||
buildAnchorListControl(data.href),
|
||||
linkListCtrl,
|
||||
relListCtrl,
|
||||
targetListCtrl,
|
||||
classListCtrl
|
||||
],
|
||||
onSubmit: function (e) {
|
||||
var assumeExternalTargets = Settings.assumeExternalTargets(editor.settings);
|
||||
var insertLink = Utils.link(editor, attachState);
|
||||
var removeLink = Utils.unlink(editor);
|
||||
var resultData = global$4.extend({}, data, e.data);
|
||||
var href = resultData.href;
|
||||
if (!href) {
|
||||
removeLink();
|
||||
return;
|
||||
}
|
||||
if (!onlyText || resultData.text === initialText) {
|
||||
delete resultData.text;
|
||||
}
|
||||
if (href.indexOf('@') > 0 && href.indexOf('//') === -1 && href.indexOf('mailto:') === -1) {
|
||||
delayedConfirm(editor, 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?', function (state) {
|
||||
if (state) {
|
||||
resultData.href = 'mailto:' + href;
|
||||
}
|
||||
insertLink(resultData);
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (assumeExternalTargets === true && !/^\w+:/i.test(href) || assumeExternalTargets === false && /^\s*www[\.|\d\.]/i.test(href)) {
|
||||
delayedConfirm(editor, 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?', function (state) {
|
||||
if (state) {
|
||||
resultData.href = 'http://' + href;
|
||||
}
|
||||
insertLink(resultData);
|
||||
});
|
||||
return;
|
||||
}
|
||||
insertLink(resultData);
|
||||
}
|
||||
});
|
||||
};
|
||||
var open$1 = function (editor) {
|
||||
createLinkList(editor, showDialog);
|
||||
};
|
||||
var Dialog = { open: open$1 };
|
||||
|
||||
var getLink = function (editor, elm) {
|
||||
return editor.dom.getParent(elm, 'a[href]');
|
||||
};
|
||||
var getSelectedLink = function (editor) {
|
||||
return getLink(editor, editor.selection.getStart());
|
||||
};
|
||||
var getHref = function (elm) {
|
||||
var href = elm.getAttribute('data-mce-href');
|
||||
return href ? href : elm.getAttribute('href');
|
||||
};
|
||||
var isContextMenuVisible = function (editor) {
|
||||
var contextmenu = editor.plugins.contextmenu;
|
||||
return contextmenu ? contextmenu.isContextMenuVisible() : false;
|
||||
};
|
||||
var hasOnlyAltModifier = function (e) {
|
||||
return e.altKey === true && e.shiftKey === false && e.ctrlKey === false && e.metaKey === false;
|
||||
};
|
||||
var gotoLink = function (editor, a) {
|
||||
if (a) {
|
||||
var href = getHref(a);
|
||||
if (/^#/.test(href)) {
|
||||
var targetEl = editor.$(href);
|
||||
if (targetEl.length) {
|
||||
editor.selection.scrollIntoView(targetEl[0], true);
|
||||
}
|
||||
} else {
|
||||
OpenUrl.open(a.href);
|
||||
}
|
||||
}
|
||||
};
|
||||
var openDialog = function (editor) {
|
||||
return function () {
|
||||
Dialog.open(editor);
|
||||
};
|
||||
};
|
||||
var gotoSelectedLink = function (editor) {
|
||||
return function () {
|
||||
gotoLink(editor, getSelectedLink(editor));
|
||||
};
|
||||
};
|
||||
var leftClickedOnAHref = function (editor) {
|
||||
return function (elm) {
|
||||
var sel, rng, node;
|
||||
if (Settings.hasContextToolbar(editor.settings) && !isContextMenuVisible(editor) && Utils.isLink(elm)) {
|
||||
sel = editor.selection;
|
||||
rng = sel.getRng();
|
||||
node = rng.startContainer;
|
||||
if (node.nodeType === 3 && sel.isCollapsed() && rng.startOffset > 0 && rng.startOffset < node.data.length) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
};
|
||||
var setupGotoLinks = function (editor) {
|
||||
editor.on('click', function (e) {
|
||||
var link = getLink(editor, e.target);
|
||||
if (link && global$1.metaKeyPressed(e)) {
|
||||
e.preventDefault();
|
||||
gotoLink(editor, link);
|
||||
}
|
||||
});
|
||||
editor.on('keydown', function (e) {
|
||||
var link = getSelectedLink(editor);
|
||||
if (link && e.keyCode === 13 && hasOnlyAltModifier(e)) {
|
||||
e.preventDefault();
|
||||
gotoLink(editor, link);
|
||||
}
|
||||
});
|
||||
};
|
||||
var toggleActiveState = function (editor) {
|
||||
return function () {
|
||||
var self = this;
|
||||
editor.on('nodechange', function (e) {
|
||||
self.active(!editor.readonly && !!Utils.getAnchorElement(editor, e.element));
|
||||
});
|
||||
};
|
||||
};
|
||||
var toggleViewLinkState = function (editor) {
|
||||
return function () {
|
||||
var self = this;
|
||||
var toggleVisibility = function (e) {
|
||||
if (Utils.hasLinks(e.parents)) {
|
||||
self.show();
|
||||
} else {
|
||||
self.hide();
|
||||
}
|
||||
};
|
||||
if (!Utils.hasLinks(editor.dom.getParents(editor.selection.getStart()))) {
|
||||
self.hide();
|
||||
}
|
||||
editor.on('nodechange', toggleVisibility);
|
||||
self.on('remove', function () {
|
||||
editor.off('nodechange', toggleVisibility);
|
||||
});
|
||||
};
|
||||
};
|
||||
var Actions = {
|
||||
openDialog: openDialog,
|
||||
gotoSelectedLink: gotoSelectedLink,
|
||||
leftClickedOnAHref: leftClickedOnAHref,
|
||||
setupGotoLinks: setupGotoLinks,
|
||||
toggleActiveState: toggleActiveState,
|
||||
toggleViewLinkState: toggleViewLinkState
|
||||
};
|
||||
|
||||
var register = function (editor) {
|
||||
editor.addCommand('mceLink', Actions.openDialog(editor));
|
||||
};
|
||||
var Commands = { register: register };
|
||||
|
||||
var setup = function (editor) {
|
||||
editor.addShortcut('Meta+K', '', Actions.openDialog(editor));
|
||||
};
|
||||
var Keyboard = { setup: setup };
|
||||
|
||||
var setupButtons = function (editor) {
|
||||
editor.addButton('link', {
|
||||
active: false,
|
||||
icon: 'link',
|
||||
tooltip: 'Insert/edit link',
|
||||
onclick: Actions.openDialog(editor),
|
||||
onpostrender: Actions.toggleActiveState(editor)
|
||||
});
|
||||
editor.addButton('unlink', {
|
||||
active: false,
|
||||
icon: 'unlink',
|
||||
tooltip: 'Remove link',
|
||||
onclick: Utils.unlink(editor),
|
||||
onpostrender: Actions.toggleActiveState(editor)
|
||||
});
|
||||
if (editor.addContextToolbar) {
|
||||
editor.addButton('openlink', {
|
||||
icon: 'newtab',
|
||||
tooltip: 'Open link',
|
||||
onclick: Actions.gotoSelectedLink(editor)
|
||||
});
|
||||
}
|
||||
};
|
||||
var setupMenuItems = function (editor) {
|
||||
editor.addMenuItem('openlink', {
|
||||
text: 'Open link',
|
||||
icon: 'newtab',
|
||||
onclick: Actions.gotoSelectedLink(editor),
|
||||
onPostRender: Actions.toggleViewLinkState(editor),
|
||||
prependToContext: true
|
||||
});
|
||||
editor.addMenuItem('link', {
|
||||
icon: 'link',
|
||||
text: 'Link',
|
||||
shortcut: 'Meta+K',
|
||||
onclick: Actions.openDialog(editor),
|
||||
stateSelector: 'a[href]',
|
||||
context: 'insert',
|
||||
prependToContext: true
|
||||
});
|
||||
editor.addMenuItem('unlink', {
|
||||
icon: 'unlink',
|
||||
text: 'Remove link',
|
||||
onclick: Utils.unlink(editor),
|
||||
stateSelector: 'a[href]'
|
||||
});
|
||||
};
|
||||
var setupContextToolbars = function (editor) {
|
||||
if (editor.addContextToolbar) {
|
||||
editor.addContextToolbar(Actions.leftClickedOnAHref(editor), 'openlink | link unlink');
|
||||
}
|
||||
};
|
||||
var Controls = {
|
||||
setupButtons: setupButtons,
|
||||
setupMenuItems: setupMenuItems,
|
||||
setupContextToolbars: setupContextToolbars
|
||||
};
|
||||
|
||||
global.add('link', function (editor) {
|
||||
Controls.setupButtons(editor);
|
||||
Controls.setupMenuItems(editor);
|
||||
Controls.setupContextToolbars(editor);
|
||||
Actions.setupGotoLinks(editor);
|
||||
Commands.register(editor);
|
||||
Keyboard.setup(editor);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return Plugin;
|
||||
|
||||
}(window));
|
||||
})();
|
1
wp-content/plugins/tinymce-advanced/mce/link/plugin.min.js
vendored
Normal file
1
wp-content/plugins/tinymce-advanced/mce/link/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,85 @@
|
|||
(function () {
|
||||
var nonbreaking = (function () {
|
||||
'use strict';
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
var stringRepeat = function (string, repeats) {
|
||||
var str = '';
|
||||
for (var index = 0; index < repeats; index++) {
|
||||
str += string;
|
||||
}
|
||||
return str;
|
||||
};
|
||||
var isVisualCharsEnabled = function (editor) {
|
||||
return editor.plugins.visualchars ? editor.plugins.visualchars.isEnabled() : false;
|
||||
};
|
||||
var insertNbsp = function (editor, times) {
|
||||
var nbsp = isVisualCharsEnabled(editor) ? '<span class="mce-nbsp"> </span>' : ' ';
|
||||
editor.insertContent(stringRepeat(nbsp, times));
|
||||
editor.dom.setAttrib(editor.dom.select('span.mce-nbsp'), 'data-mce-bogus', '1');
|
||||
};
|
||||
var Actions = { insertNbsp: insertNbsp };
|
||||
|
||||
var register = function (editor) {
|
||||
editor.addCommand('mceNonBreaking', function () {
|
||||
Actions.insertNbsp(editor, 1);
|
||||
});
|
||||
};
|
||||
var Commands = { register: register };
|
||||
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.util.VK');
|
||||
|
||||
var getKeyboardSpaces = function (editor) {
|
||||
var spaces = editor.getParam('nonbreaking_force_tab', 0);
|
||||
if (typeof spaces === 'boolean') {
|
||||
return spaces === true ? 3 : 0;
|
||||
} else {
|
||||
return spaces;
|
||||
}
|
||||
};
|
||||
var Settings = { getKeyboardSpaces: getKeyboardSpaces };
|
||||
|
||||
var setup = function (editor) {
|
||||
var spaces = Settings.getKeyboardSpaces(editor);
|
||||
if (spaces > 0) {
|
||||
editor.on('keydown', function (e) {
|
||||
if (e.keyCode === global$1.TAB && !e.isDefaultPrevented()) {
|
||||
if (e.shiftKey) {
|
||||
return;
|
||||
}
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
Actions.insertNbsp(editor, spaces);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var Keyboard = { setup: setup };
|
||||
|
||||
var register$1 = function (editor) {
|
||||
editor.addButton('nonbreaking', {
|
||||
title: 'Nonbreaking space',
|
||||
cmd: 'mceNonBreaking'
|
||||
});
|
||||
editor.addMenuItem('nonbreaking', {
|
||||
icon: 'nonbreaking',
|
||||
text: 'Nonbreaking space',
|
||||
cmd: 'mceNonBreaking',
|
||||
context: 'insert'
|
||||
});
|
||||
};
|
||||
var Buttons = { register: register$1 };
|
||||
|
||||
global.add('nonbreaking', function (editor) {
|
||||
Commands.register(editor);
|
||||
Buttons.register(editor);
|
||||
Keyboard.setup(editor);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return Plugin;
|
||||
|
||||
}());
|
||||
})();
|
1
wp-content/plugins/tinymce-advanced/mce/nonbreaking/plugin.min.js
vendored
Normal file
1
wp-content/plugins/tinymce-advanced/mce/nonbreaking/plugin.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(n,e){var t,i=(t=n).plugins.visualchars&&t.plugins.visualchars.isEnabled()?'<span class="mce-nbsp"> </span>':" ";n.insertContent(function(n,e){for(var t="",i=0;i<e;i++)t+=n;return t}(i,e)),n.dom.setAttrib(n.dom.select("span.mce-nbsp"),"data-mce-bogus","1")},e=function(n){n.addCommand("mceNonBreaking",function(){i(n,1)})},o=tinymce.util.Tools.resolve("tinymce.util.VK"),a=function(n){var e=n.getParam("nonbreaking_force_tab",0);return"boolean"==typeof e?!0===e?3:0:e},t=function(e){var t=a(e);0<t&&e.on("keydown",function(n){if(n.keyCode===o.TAB&&!n.isDefaultPrevented()){if(n.shiftKey)return;n.preventDefault(),n.stopImmediatePropagation(),i(e,t)}})},r=function(n){n.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),n.addMenuItem("nonbreaking",{icon:"nonbreaking",text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"})};n.add("nonbreaking",function(n){e(n),r(n),t(n)})}();
|
44
wp-content/plugins/tinymce-advanced/mce/print/plugin.js
Normal file
44
wp-content/plugins/tinymce-advanced/mce/print/plugin.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
(function () {
|
||||
var print = (function () {
|
||||
'use strict';
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
|
||||
|
||||
var register = function (editor) {
|
||||
editor.addCommand('mcePrint', function () {
|
||||
if (global$1.ie && global$1.ie <= 11) {
|
||||
editor.getDoc().execCommand('print', false, null);
|
||||
} else {
|
||||
editor.getWin().print();
|
||||
}
|
||||
});
|
||||
};
|
||||
var Commands = { register: register };
|
||||
|
||||
var register$1 = function (editor) {
|
||||
editor.addButton('print', {
|
||||
title: 'Print',
|
||||
cmd: 'mcePrint'
|
||||
});
|
||||
editor.addMenuItem('print', {
|
||||
text: 'Print',
|
||||
cmd: 'mcePrint',
|
||||
icon: 'print'
|
||||
});
|
||||
};
|
||||
var Buttons = { register: register$1 };
|
||||
|
||||
global.add('print', function (editor) {
|
||||
Commands.register(editor);
|
||||
Buttons.register(editor);
|
||||
editor.addShortcut('Meta+P', '', 'mcePrint');
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return Plugin;
|
||||
|
||||
}());
|
||||
})();
|
1
wp-content/plugins/tinymce-advanced/mce/print/plugin.min.js
vendored
Normal file
1
wp-content/plugins/tinymce-advanced/mce/print/plugin.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),i=function(t){t.addCommand("mcePrint",function(){n.ie&&n.ie<=11?t.getDoc().execCommand("print",!1,null):t.getWin().print()})},e=function(t){t.addButton("print",{title:"Print",cmd:"mcePrint"}),t.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print"})};t.add("print",function(t){i(t),e(t),t.addShortcut("Meta+P","","mcePrint")})}();
|
601
wp-content/plugins/tinymce-advanced/mce/searchreplace/plugin.js
Normal file
601
wp-content/plugins/tinymce-advanced/mce/searchreplace/plugin.js
Normal file
|
@ -0,0 +1,601 @@
|
|||
(function () {
|
||||
var searchreplace = (function () {
|
||||
'use strict';
|
||||
|
||||
var Cell = function (initial) {
|
||||
var value = initial;
|
||||
var get = function () {
|
||||
return value;
|
||||
};
|
||||
var set = function (v) {
|
||||
value = v;
|
||||
};
|
||||
var clone = function () {
|
||||
return Cell(get());
|
||||
};
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
clone: clone
|
||||
};
|
||||
};
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
function isContentEditableFalse(node) {
|
||||
return node && node.nodeType === 1 && node.contentEditable === 'false';
|
||||
}
|
||||
function findAndReplaceDOMText(regex, node, replacementNode, captureGroup, schema) {
|
||||
var m;
|
||||
var matches = [];
|
||||
var text, count = 0, doc;
|
||||
var blockElementsMap, hiddenTextElementsMap, shortEndedElementsMap;
|
||||
doc = node.ownerDocument;
|
||||
blockElementsMap = schema.getBlockElements();
|
||||
hiddenTextElementsMap = schema.getWhiteSpaceElements();
|
||||
shortEndedElementsMap = schema.getShortEndedElements();
|
||||
function getMatchIndexes(m, captureGroup) {
|
||||
captureGroup = captureGroup || 0;
|
||||
if (!m[0]) {
|
||||
throw new Error('findAndReplaceDOMText cannot handle zero-length matches');
|
||||
}
|
||||
var index = m.index;
|
||||
if (captureGroup > 0) {
|
||||
var cg = m[captureGroup];
|
||||
if (!cg) {
|
||||
throw new Error('Invalid capture group');
|
||||
}
|
||||
index += m[0].indexOf(cg);
|
||||
m[0] = cg;
|
||||
}
|
||||
return [
|
||||
index,
|
||||
index + m[0].length,
|
||||
[m[0]]
|
||||
];
|
||||
}
|
||||
function getText(node) {
|
||||
var txt;
|
||||
if (node.nodeType === 3) {
|
||||
return node.data;
|
||||
}
|
||||
if (hiddenTextElementsMap[node.nodeName] && !blockElementsMap[node.nodeName]) {
|
||||
return '';
|
||||
}
|
||||
txt = '';
|
||||
if (isContentEditableFalse(node)) {
|
||||
return '\n';
|
||||
}
|
||||
if (blockElementsMap[node.nodeName] || shortEndedElementsMap[node.nodeName]) {
|
||||
txt += '\n';
|
||||
}
|
||||
if (node = node.firstChild) {
|
||||
do {
|
||||
txt += getText(node);
|
||||
} while (node = node.nextSibling);
|
||||
}
|
||||
return txt;
|
||||
}
|
||||
function stepThroughMatches(node, matches, replaceFn) {
|
||||
var startNode, endNode, startNodeIndex, endNodeIndex, innerNodes = [], atIndex = 0, curNode = node, matchLocation = matches.shift(), matchIndex = 0;
|
||||
out:
|
||||
while (true) {
|
||||
if (blockElementsMap[curNode.nodeName] || shortEndedElementsMap[curNode.nodeName] || isContentEditableFalse(curNode)) {
|
||||
atIndex++;
|
||||
}
|
||||
if (curNode.nodeType === 3) {
|
||||
if (!endNode && curNode.length + atIndex >= matchLocation[1]) {
|
||||
endNode = curNode;
|
||||
endNodeIndex = matchLocation[1] - atIndex;
|
||||
} else if (startNode) {
|
||||
innerNodes.push(curNode);
|
||||
}
|
||||
if (!startNode && curNode.length + atIndex > matchLocation[0]) {
|
||||
startNode = curNode;
|
||||
startNodeIndex = matchLocation[0] - atIndex;
|
||||
}
|
||||
atIndex += curNode.length;
|
||||
}
|
||||
if (startNode && endNode) {
|
||||
curNode = replaceFn({
|
||||
startNode: startNode,
|
||||
startNodeIndex: startNodeIndex,
|
||||
endNode: endNode,
|
||||
endNodeIndex: endNodeIndex,
|
||||
innerNodes: innerNodes,
|
||||
match: matchLocation[2],
|
||||
matchIndex: matchIndex
|
||||
});
|
||||
atIndex -= endNode.length - endNodeIndex;
|
||||
startNode = null;
|
||||
endNode = null;
|
||||
innerNodes = [];
|
||||
matchLocation = matches.shift();
|
||||
matchIndex++;
|
||||
if (!matchLocation) {
|
||||
break;
|
||||
}
|
||||
} else if ((!hiddenTextElementsMap[curNode.nodeName] || blockElementsMap[curNode.nodeName]) && curNode.firstChild) {
|
||||
if (!isContentEditableFalse(curNode)) {
|
||||
curNode = curNode.firstChild;
|
||||
continue;
|
||||
}
|
||||
} else if (curNode.nextSibling) {
|
||||
curNode = curNode.nextSibling;
|
||||
continue;
|
||||
}
|
||||
while (true) {
|
||||
if (curNode.nextSibling) {
|
||||
curNode = curNode.nextSibling;
|
||||
break;
|
||||
} else if (curNode.parentNode !== node) {
|
||||
curNode = curNode.parentNode;
|
||||
} else {
|
||||
break out;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function genReplacer(nodeName) {
|
||||
var makeReplacementNode;
|
||||
if (typeof nodeName !== 'function') {
|
||||
var stencilNode_1 = nodeName.nodeType ? nodeName : doc.createElement(nodeName);
|
||||
makeReplacementNode = function (fill, matchIndex) {
|
||||
var clone = stencilNode_1.cloneNode(false);
|
||||
clone.setAttribute('data-mce-index', matchIndex);
|
||||
if (fill) {
|
||||
clone.appendChild(doc.createTextNode(fill));
|
||||
}
|
||||
return clone;
|
||||
};
|
||||
} else {
|
||||
makeReplacementNode = nodeName;
|
||||
}
|
||||
return function (range) {
|
||||
var before;
|
||||
var after;
|
||||
var parentNode;
|
||||
var startNode = range.startNode;
|
||||
var endNode = range.endNode;
|
||||
var matchIndex = range.matchIndex;
|
||||
if (startNode === endNode) {
|
||||
var node_1 = startNode;
|
||||
parentNode = node_1.parentNode;
|
||||
if (range.startNodeIndex > 0) {
|
||||
before = doc.createTextNode(node_1.data.substring(0, range.startNodeIndex));
|
||||
parentNode.insertBefore(before, node_1);
|
||||
}
|
||||
var el = makeReplacementNode(range.match[0], matchIndex);
|
||||
parentNode.insertBefore(el, node_1);
|
||||
if (range.endNodeIndex < node_1.length) {
|
||||
after = doc.createTextNode(node_1.data.substring(range.endNodeIndex));
|
||||
parentNode.insertBefore(after, node_1);
|
||||
}
|
||||
node_1.parentNode.removeChild(node_1);
|
||||
return el;
|
||||
}
|
||||
before = doc.createTextNode(startNode.data.substring(0, range.startNodeIndex));
|
||||
after = doc.createTextNode(endNode.data.substring(range.endNodeIndex));
|
||||
var elA = makeReplacementNode(startNode.data.substring(range.startNodeIndex), matchIndex);
|
||||
for (var i = 0, l = range.innerNodes.length; i < l; ++i) {
|
||||
var innerNode = range.innerNodes[i];
|
||||
var innerEl = makeReplacementNode(innerNode.data, matchIndex);
|
||||
innerNode.parentNode.replaceChild(innerEl, innerNode);
|
||||
}
|
||||
var elB = makeReplacementNode(endNode.data.substring(0, range.endNodeIndex), matchIndex);
|
||||
parentNode = startNode.parentNode;
|
||||
parentNode.insertBefore(before, startNode);
|
||||
parentNode.insertBefore(elA, startNode);
|
||||
parentNode.removeChild(startNode);
|
||||
parentNode = endNode.parentNode;
|
||||
parentNode.insertBefore(elB, endNode);
|
||||
parentNode.insertBefore(after, endNode);
|
||||
parentNode.removeChild(endNode);
|
||||
return elB;
|
||||
};
|
||||
}
|
||||
text = getText(node);
|
||||
if (!text) {
|
||||
return;
|
||||
}
|
||||
if (regex.global) {
|
||||
while (m = regex.exec(text)) {
|
||||
matches.push(getMatchIndexes(m, captureGroup));
|
||||
}
|
||||
} else {
|
||||
m = text.match(regex);
|
||||
matches.push(getMatchIndexes(m, captureGroup));
|
||||
}
|
||||
if (matches.length) {
|
||||
count = matches.length;
|
||||
stepThroughMatches(node, matches, genReplacer(replacementNode));
|
||||
}
|
||||
return count;
|
||||
}
|
||||
var FindReplaceText = { findAndReplaceDOMText: findAndReplaceDOMText };
|
||||
|
||||
var getElmIndex = function (elm) {
|
||||
var value = elm.getAttribute('data-mce-index');
|
||||
if (typeof value === 'number') {
|
||||
return '' + value;
|
||||
}
|
||||
return value;
|
||||
};
|
||||
var markAllMatches = function (editor, currentIndexState, regex) {
|
||||
var node, marker;
|
||||
marker = editor.dom.create('span', { 'data-mce-bogus': 1 });
|
||||
marker.className = 'mce-match-marker';
|
||||
node = editor.getBody();
|
||||
done(editor, currentIndexState, false);
|
||||
return FindReplaceText.findAndReplaceDOMText(regex, node, marker, false, editor.schema);
|
||||
};
|
||||
var unwrap = function (node) {
|
||||
var parentNode = node.parentNode;
|
||||
if (node.firstChild) {
|
||||
parentNode.insertBefore(node.firstChild, node);
|
||||
}
|
||||
node.parentNode.removeChild(node);
|
||||
};
|
||||
var findSpansByIndex = function (editor, index) {
|
||||
var nodes;
|
||||
var spans = [];
|
||||
nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
|
||||
if (nodes.length) {
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
var nodeIndex = getElmIndex(nodes[i]);
|
||||
if (nodeIndex === null || !nodeIndex.length) {
|
||||
continue;
|
||||
}
|
||||
if (nodeIndex === index.toString()) {
|
||||
spans.push(nodes[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return spans;
|
||||
};
|
||||
var moveSelection = function (editor, currentIndexState, forward) {
|
||||
var testIndex = currentIndexState.get();
|
||||
var dom = editor.dom;
|
||||
forward = forward !== false;
|
||||
if (forward) {
|
||||
testIndex++;
|
||||
} else {
|
||||
testIndex--;
|
||||
}
|
||||
dom.removeClass(findSpansByIndex(editor, currentIndexState.get()), 'mce-match-marker-selected');
|
||||
var spans = findSpansByIndex(editor, testIndex);
|
||||
if (spans.length) {
|
||||
dom.addClass(findSpansByIndex(editor, testIndex), 'mce-match-marker-selected');
|
||||
editor.selection.scrollIntoView(spans[0]);
|
||||
return testIndex;
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
var removeNode = function (dom, node) {
|
||||
var parent = node.parentNode;
|
||||
dom.remove(node);
|
||||
if (dom.isEmpty(parent)) {
|
||||
dom.remove(parent);
|
||||
}
|
||||
};
|
||||
var find = function (editor, currentIndexState, text, matchCase, wholeWord) {
|
||||
text = text.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
|
||||
text = text.replace(/\s/g, '[^\\S\\r\\n]');
|
||||
text = wholeWord ? '\\b' + text + '\\b' : text;
|
||||
var count = markAllMatches(editor, currentIndexState, new RegExp(text, matchCase ? 'g' : 'gi'));
|
||||
if (count) {
|
||||
currentIndexState.set(-1);
|
||||
currentIndexState.set(moveSelection(editor, currentIndexState, true));
|
||||
}
|
||||
return count;
|
||||
};
|
||||
var next = function (editor, currentIndexState) {
|
||||
var index = moveSelection(editor, currentIndexState, true);
|
||||
if (index !== -1) {
|
||||
currentIndexState.set(index);
|
||||
}
|
||||
};
|
||||
var prev = function (editor, currentIndexState) {
|
||||
var index = moveSelection(editor, currentIndexState, false);
|
||||
if (index !== -1) {
|
||||
currentIndexState.set(index);
|
||||
}
|
||||
};
|
||||
var isMatchSpan = function (node) {
|
||||
var matchIndex = getElmIndex(node);
|
||||
return matchIndex !== null && matchIndex.length > 0;
|
||||
};
|
||||
var replace = function (editor, currentIndexState, text, forward, all) {
|
||||
var i, nodes, node, matchIndex, currentMatchIndex, nextIndex = currentIndexState.get(), hasMore;
|
||||
forward = forward !== false;
|
||||
node = editor.getBody();
|
||||
nodes = global$1.grep(global$1.toArray(node.getElementsByTagName('span')), isMatchSpan);
|
||||
for (i = 0; i < nodes.length; i++) {
|
||||
var nodeIndex = getElmIndex(nodes[i]);
|
||||
matchIndex = currentMatchIndex = parseInt(nodeIndex, 10);
|
||||
if (all || matchIndex === currentIndexState.get()) {
|
||||
if (text.length) {
|
||||
nodes[i].firstChild.nodeValue = text;
|
||||
unwrap(nodes[i]);
|
||||
} else {
|
||||
removeNode(editor.dom, nodes[i]);
|
||||
}
|
||||
while (nodes[++i]) {
|
||||
matchIndex = parseInt(getElmIndex(nodes[i]), 10);
|
||||
if (matchIndex === currentMatchIndex) {
|
||||
removeNode(editor.dom, nodes[i]);
|
||||
} else {
|
||||
i--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (forward) {
|
||||
nextIndex--;
|
||||
}
|
||||
} else if (currentMatchIndex > currentIndexState.get()) {
|
||||
nodes[i].setAttribute('data-mce-index', currentMatchIndex - 1);
|
||||
}
|
||||
}
|
||||
currentIndexState.set(nextIndex);
|
||||
if (forward) {
|
||||
hasMore = hasNext(editor, currentIndexState);
|
||||
next(editor, currentIndexState);
|
||||
} else {
|
||||
hasMore = hasPrev(editor, currentIndexState);
|
||||
prev(editor, currentIndexState);
|
||||
}
|
||||
return !all && hasMore;
|
||||
};
|
||||
var done = function (editor, currentIndexState, keepEditorSelection) {
|
||||
var i, nodes, startContainer, endContainer;
|
||||
nodes = global$1.toArray(editor.getBody().getElementsByTagName('span'));
|
||||
for (i = 0; i < nodes.length; i++) {
|
||||
var nodeIndex = getElmIndex(nodes[i]);
|
||||
if (nodeIndex !== null && nodeIndex.length) {
|
||||
if (nodeIndex === currentIndexState.get().toString()) {
|
||||
if (!startContainer) {
|
||||
startContainer = nodes[i].firstChild;
|
||||
}
|
||||
endContainer = nodes[i].firstChild;
|
||||
}
|
||||
unwrap(nodes[i]);
|
||||
}
|
||||
}
|
||||
if (startContainer && endContainer) {
|
||||
var rng = editor.dom.createRng();
|
||||
rng.setStart(startContainer, 0);
|
||||
rng.setEnd(endContainer, endContainer.data.length);
|
||||
if (keepEditorSelection !== false) {
|
||||
editor.selection.setRng(rng);
|
||||
}
|
||||
return rng;
|
||||
}
|
||||
};
|
||||
var hasNext = function (editor, currentIndexState) {
|
||||
return findSpansByIndex(editor, currentIndexState.get() + 1).length > 0;
|
||||
};
|
||||
var hasPrev = function (editor, currentIndexState) {
|
||||
return findSpansByIndex(editor, currentIndexState.get() - 1).length > 0;
|
||||
};
|
||||
var Actions = {
|
||||
done: done,
|
||||
find: find,
|
||||
next: next,
|
||||
prev: prev,
|
||||
replace: replace,
|
||||
hasNext: hasNext,
|
||||
hasPrev: hasPrev
|
||||
};
|
||||
|
||||
var get = function (editor, currentIndexState) {
|
||||
var done = function (keepEditorSelection) {
|
||||
return Actions.done(editor, currentIndexState, keepEditorSelection);
|
||||
};
|
||||
var find = function (text, matchCase, wholeWord) {
|
||||
return Actions.find(editor, currentIndexState, text, matchCase, wholeWord);
|
||||
};
|
||||
var next = function () {
|
||||
return Actions.next(editor, currentIndexState);
|
||||
};
|
||||
var prev = function () {
|
||||
return Actions.prev(editor, currentIndexState);
|
||||
};
|
||||
var replace = function (text, forward, all) {
|
||||
return Actions.replace(editor, currentIndexState, text, forward, all);
|
||||
};
|
||||
return {
|
||||
done: done,
|
||||
find: find,
|
||||
next: next,
|
||||
prev: prev,
|
||||
replace: replace
|
||||
};
|
||||
};
|
||||
var Api = { get: get };
|
||||
|
||||
var open = function (editor, currentIndexState) {
|
||||
var last = {}, selectedText;
|
||||
editor.undoManager.add();
|
||||
selectedText = global$1.trim(editor.selection.getContent({ format: 'text' }));
|
||||
function updateButtonStates() {
|
||||
win.statusbar.find('#next').disabled(Actions.hasNext(editor, currentIndexState) === false);
|
||||
win.statusbar.find('#prev').disabled(Actions.hasPrev(editor, currentIndexState) === false);
|
||||
}
|
||||
function notFoundAlert() {
|
||||
editor.windowManager.alert('Could not find the specified string.', function () {
|
||||
win.find('#find')[0].focus();
|
||||
});
|
||||
}
|
||||
var win = editor.windowManager.open({
|
||||
layout: 'flex',
|
||||
pack: 'center',
|
||||
align: 'center',
|
||||
onClose: function () {
|
||||
editor.focus();
|
||||
Actions.done(editor, currentIndexState);
|
||||
editor.undoManager.add();
|
||||
},
|
||||
onSubmit: function (e) {
|
||||
var count, caseState, text, wholeWord;
|
||||
e.preventDefault();
|
||||
caseState = win.find('#case').checked();
|
||||
wholeWord = win.find('#words').checked();
|
||||
text = win.find('#find').value();
|
||||
if (!text.length) {
|
||||
Actions.done(editor, currentIndexState, false);
|
||||
win.statusbar.items().slice(1).disabled(true);
|
||||
return;
|
||||
}
|
||||
if (last.text === text && last.caseState === caseState && last.wholeWord === wholeWord) {
|
||||
if (!Actions.hasNext(editor, currentIndexState)) {
|
||||
notFoundAlert();
|
||||
return;
|
||||
}
|
||||
Actions.next(editor, currentIndexState);
|
||||
updateButtonStates();
|
||||
return;
|
||||
}
|
||||
count = Actions.find(editor, currentIndexState, text, caseState, wholeWord);
|
||||
if (!count) {
|
||||
notFoundAlert();
|
||||
}
|
||||
win.statusbar.items().slice(1).disabled(count === 0);
|
||||
updateButtonStates();
|
||||
last = {
|
||||
text: text,
|
||||
caseState: caseState,
|
||||
wholeWord: wholeWord
|
||||
};
|
||||
},
|
||||
buttons: [
|
||||
{
|
||||
text: 'Find',
|
||||
subtype: 'primary',
|
||||
onclick: function () {
|
||||
win.submit();
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'Replace',
|
||||
disabled: true,
|
||||
onclick: function () {
|
||||
if (!Actions.replace(editor, currentIndexState, win.find('#replace').value())) {
|
||||
win.statusbar.items().slice(1).disabled(true);
|
||||
currentIndexState.set(-1);
|
||||
last = {};
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'Replace all',
|
||||
disabled: true,
|
||||
onclick: function () {
|
||||
Actions.replace(editor, currentIndexState, win.find('#replace').value(), true, true);
|
||||
win.statusbar.items().slice(1).disabled(true);
|
||||
last = {};
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'spacer',
|
||||
flex: 1
|
||||
},
|
||||
{
|
||||
text: 'Prev',
|
||||
name: 'prev',
|
||||
disabled: true,
|
||||
onclick: function () {
|
||||
Actions.prev(editor, currentIndexState);
|
||||
updateButtonStates();
|
||||
}
|
||||
},
|
||||
{
|
||||
text: 'Next',
|
||||
name: 'next',
|
||||
disabled: true,
|
||||
onclick: function () {
|
||||
Actions.next(editor, currentIndexState);
|
||||
updateButtonStates();
|
||||
}
|
||||
}
|
||||
],
|
||||
title: 'Find and replace',
|
||||
items: {
|
||||
type: 'form',
|
||||
padding: 20,
|
||||
labelGap: 30,
|
||||
spacing: 10,
|
||||
items: [
|
||||
{
|
||||
type: 'textbox',
|
||||
name: 'find',
|
||||
size: 40,
|
||||
label: 'Find',
|
||||
value: selectedText
|
||||
},
|
||||
{
|
||||
type: 'textbox',
|
||||
name: 'replace',
|
||||
size: 40,
|
||||
label: 'Replace with'
|
||||
},
|
||||
{
|
||||
type: 'checkbox',
|
||||
name: 'case',
|
||||
text: 'Match case',
|
||||
label: ' '
|
||||
},
|
||||
{
|
||||
type: 'checkbox',
|
||||
name: 'words',
|
||||
text: 'Whole words',
|
||||
label: ' '
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
};
|
||||
var Dialog = { open: open };
|
||||
|
||||
var register = function (editor, currentIndexState) {
|
||||
editor.addCommand('SearchReplace', function () {
|
||||
Dialog.open(editor, currentIndexState);
|
||||
});
|
||||
};
|
||||
var Commands = { register: register };
|
||||
|
||||
var showDialog = function (editor, currentIndexState) {
|
||||
return function () {
|
||||
Dialog.open(editor, currentIndexState);
|
||||
};
|
||||
};
|
||||
var register$1 = function (editor, currentIndexState) {
|
||||
editor.addMenuItem('searchreplace', {
|
||||
text: 'Find and replace',
|
||||
shortcut: 'Meta+F',
|
||||
onclick: showDialog(editor, currentIndexState),
|
||||
separator: 'before',
|
||||
context: 'edit'
|
||||
});
|
||||
editor.addButton('searchreplace', {
|
||||
tooltip: 'Find and replace',
|
||||
onclick: showDialog(editor, currentIndexState)
|
||||
});
|
||||
editor.shortcuts.add('Meta+F', '', showDialog(editor, currentIndexState));
|
||||
};
|
||||
var Buttons = { register: register$1 };
|
||||
|
||||
global.add('searchreplace', function (editor) {
|
||||
var currentIndexState = Cell(-1);
|
||||
Commands.register(editor, currentIndexState);
|
||||
Buttons.register(editor, currentIndexState);
|
||||
return Api.get(editor, currentIndexState);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return Plugin;
|
||||
|
||||
}());
|
||||
})();
|
1
wp-content/plugins/tinymce-advanced/mce/searchreplace/plugin.min.js
vendored
Normal file
1
wp-content/plugins/tinymce-advanced/mce/searchreplace/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
9270
wp-content/plugins/tinymce-advanced/mce/table/plugin.js
Normal file
9270
wp-content/plugins/tinymce-advanced/mce/table/plugin.js
Normal file
File diff suppressed because it is too large
Load diff
1
wp-content/plugins/tinymce-advanced/mce/table/plugin.min.js
vendored
Normal file
1
wp-content/plugins/tinymce-advanced/mce/table/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,154 @@
|
|||
.mce-visualblocks p {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h1 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h2 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h3 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h4 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h5 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks h6 {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks div:not([data-mce-bogus]) {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks section {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks article {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks blockquote {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks address {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks pre {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin-left: 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks figure {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks hgroup {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks aside {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks figcaption {
|
||||
border: 1px dashed #BBB;
|
||||
}
|
||||
|
||||
.mce-visualblocks ul {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks ol {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.mce-visualblocks dl {
|
||||
padding-top: 10px;
|
||||
border: 1px dashed #BBB;
|
||||
margin: 0 0 1em 3px;
|
||||
background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==);
|
||||
background-repeat: no-repeat;
|
||||
}
|
135
wp-content/plugins/tinymce-advanced/mce/visualblocks/plugin.js
Normal file
135
wp-content/plugins/tinymce-advanced/mce/visualblocks/plugin.js
Normal file
|
@ -0,0 +1,135 @@
|
|||
(function () {
|
||||
var visualblocks = (function () {
|
||||
'use strict';
|
||||
|
||||
var Cell = function (initial) {
|
||||
var value = initial;
|
||||
var get = function () {
|
||||
return value;
|
||||
};
|
||||
var set = function (v) {
|
||||
value = v;
|
||||
};
|
||||
var clone = function () {
|
||||
return Cell(get());
|
||||
};
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
clone: clone
|
||||
};
|
||||
};
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
var fireVisualBlocks = function (editor, state) {
|
||||
editor.fire('VisualBlocks', { state: state });
|
||||
};
|
||||
var Events = { fireVisualBlocks: fireVisualBlocks };
|
||||
|
||||
var isEnabledByDefault = function (editor) {
|
||||
return editor.getParam('visualblocks_default_state', false);
|
||||
};
|
||||
var getContentCss = function (editor) {
|
||||
return editor.settings.visualblocks_content_css;
|
||||
};
|
||||
var Settings = {
|
||||
isEnabledByDefault: isEnabledByDefault,
|
||||
getContentCss: getContentCss
|
||||
};
|
||||
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
|
||||
|
||||
var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
||||
|
||||
var cssId = global$1.DOM.uniqueId();
|
||||
var load = function (doc, url) {
|
||||
var linkElements = global$2.toArray(doc.getElementsByTagName('link'));
|
||||
var matchingLinkElms = global$2.grep(linkElements, function (head) {
|
||||
return head.id === cssId;
|
||||
});
|
||||
if (matchingLinkElms.length === 0) {
|
||||
var linkElm = global$1.DOM.create('link', {
|
||||
id: cssId,
|
||||
rel: 'stylesheet',
|
||||
href: url
|
||||
});
|
||||
doc.getElementsByTagName('head')[0].appendChild(linkElm);
|
||||
}
|
||||
};
|
||||
var LoadCss = { load: load };
|
||||
|
||||
var toggleVisualBlocks = function (editor, pluginUrl, enabledState) {
|
||||
var dom = editor.dom;
|
||||
var contentCss = Settings.getContentCss(editor);
|
||||
LoadCss.load(editor.getDoc(), contentCss ? contentCss : pluginUrl + '/css/visualblocks.css');
|
||||
dom.toggleClass(editor.getBody(), 'mce-visualblocks');
|
||||
enabledState.set(!enabledState.get());
|
||||
Events.fireVisualBlocks(editor, enabledState.get());
|
||||
};
|
||||
var VisualBlocks = { toggleVisualBlocks: toggleVisualBlocks };
|
||||
|
||||
var register = function (editor, pluginUrl, enabledState) {
|
||||
editor.addCommand('mceVisualBlocks', function () {
|
||||
VisualBlocks.toggleVisualBlocks(editor, pluginUrl, enabledState);
|
||||
});
|
||||
};
|
||||
var Commands = { register: register };
|
||||
|
||||
var setup = function (editor, pluginUrl, enabledState) {
|
||||
editor.on('PreviewFormats AfterPreviewFormats', function (e) {
|
||||
if (enabledState.get()) {
|
||||
editor.dom.toggleClass(editor.getBody(), 'mce-visualblocks', e.type === 'afterpreviewformats');
|
||||
}
|
||||
});
|
||||
editor.on('init', function () {
|
||||
if (Settings.isEnabledByDefault(editor)) {
|
||||
VisualBlocks.toggleVisualBlocks(editor, pluginUrl, enabledState);
|
||||
}
|
||||
});
|
||||
editor.on('remove', function () {
|
||||
editor.dom.removeClass(editor.getBody(), 'mce-visualblocks');
|
||||
});
|
||||
};
|
||||
var Bindings = { setup: setup };
|
||||
|
||||
var toggleActiveState = function (editor, enabledState) {
|
||||
return function (e) {
|
||||
var ctrl = e.control;
|
||||
ctrl.active(enabledState.get());
|
||||
editor.on('VisualBlocks', function (e) {
|
||||
ctrl.active(e.state);
|
||||
});
|
||||
};
|
||||
};
|
||||
var register$1 = function (editor, enabledState) {
|
||||
editor.addButton('visualblocks', {
|
||||
active: false,
|
||||
title: 'Show blocks',
|
||||
cmd: 'mceVisualBlocks',
|
||||
onPostRender: toggleActiveState(editor, enabledState)
|
||||
});
|
||||
editor.addMenuItem('visualblocks', {
|
||||
text: 'Show blocks',
|
||||
cmd: 'mceVisualBlocks',
|
||||
onPostRender: toggleActiveState(editor, enabledState),
|
||||
selectable: true,
|
||||
context: 'view',
|
||||
prependToContext: true
|
||||
});
|
||||
};
|
||||
var Buttons = { register: register$1 };
|
||||
|
||||
global.add('visualblocks', function (editor, pluginUrl) {
|
||||
var enabledState = Cell(false);
|
||||
Commands.register(editor, pluginUrl, enabledState);
|
||||
Buttons.register(editor, enabledState);
|
||||
Bindings.setup(editor, pluginUrl, enabledState);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return Plugin;
|
||||
|
||||
}());
|
||||
})();
|
1
wp-content/plugins/tinymce-advanced/mce/visualblocks/plugin.min.js
vendored
Normal file
1
wp-content/plugins/tinymce-advanced/mce/visualblocks/plugin.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!function(){"use strict";var o=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return o(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),i=function(e,t){e.fire("VisualBlocks",{state:t})},s=function(e){return e.getParam("visualblocks_default_state",!1)},c=function(e){return e.settings.visualblocks_content_css},l=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),u=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=l.DOM.uniqueId(),r=function(e,t){var n=u.toArray(e.getElementsByTagName("link"));if(0===u.grep(n,function(e){return e.id===a}).length){var o=l.DOM.create("link",{id:a,rel:"stylesheet",href:t});e.getElementsByTagName("head")[0].appendChild(o)}},m=function(e,t,n){var o=e.dom,s=c(e);r(e.getDoc(),s||t+"/css/visualblocks.css"),o.toggleClass(e.getBody(),"mce-visualblocks"),n.set(!n.get()),i(e,n.get())},f=function(e,t,n){e.addCommand("mceVisualBlocks",function(){m(e,t,n)})},d=function(t,e,n){t.on("PreviewFormats AfterPreviewFormats",function(e){n.get()&&t.dom.toggleClass(t.getBody(),"mce-visualblocks","afterpreviewformats"===e.type)}),t.on("init",function(){s(t)&&m(t,e,n)}),t.on("remove",function(){t.dom.removeClass(t.getBody(),"mce-visualblocks")})},n=function(n,o){return function(e){var t=e.control;t.active(o.get()),n.on("VisualBlocks",function(e){t.active(e.state)})}},v=function(e,t){e.addButton("visualblocks",{active:!1,title:"Show blocks",cmd:"mceVisualBlocks",onPostRender:n(e,t)}),e.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:n(e,t),selectable:!0,context:"view",prependToContext:!0})};e.add("visualblocks",function(e,t){var n=o(!1);f(e,t,n),v(e,n),d(e,t,n)})}();
|
457
wp-content/plugins/tinymce-advanced/mce/visualchars/plugin.js
Normal file
457
wp-content/plugins/tinymce-advanced/mce/visualchars/plugin.js
Normal file
|
@ -0,0 +1,457 @@
|
|||
(function () {
|
||||
var visualchars = (function (domGlobals) {
|
||||
'use strict';
|
||||
|
||||
var Cell = function (initial) {
|
||||
var value = initial;
|
||||
var get = function () {
|
||||
return value;
|
||||
};
|
||||
var set = function (v) {
|
||||
value = v;
|
||||
};
|
||||
var clone = function () {
|
||||
return Cell(get());
|
||||
};
|
||||
return {
|
||||
get: get,
|
||||
set: set,
|
||||
clone: clone
|
||||
};
|
||||
};
|
||||
|
||||
var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
||||
|
||||
var get = function (toggleState) {
|
||||
var isEnabled = function () {
|
||||
return toggleState.get();
|
||||
};
|
||||
return { isEnabled: isEnabled };
|
||||
};
|
||||
var Api = { get: get };
|
||||
|
||||
var fireVisualChars = function (editor, state) {
|
||||
return editor.fire('VisualChars', { state: state });
|
||||
};
|
||||
var Events = { fireVisualChars: fireVisualChars };
|
||||
|
||||
var noop = function () {
|
||||
};
|
||||
var constant = function (value) {
|
||||
return function () {
|
||||
return value;
|
||||
};
|
||||
};
|
||||
var never = constant(false);
|
||||
var always = constant(true);
|
||||
|
||||
var none = function () {
|
||||
return NONE;
|
||||
};
|
||||
var NONE = function () {
|
||||
var eq = function (o) {
|
||||
return o.isNone();
|
||||
};
|
||||
var call = function (thunk) {
|
||||
return thunk();
|
||||
};
|
||||
var id = function (n) {
|
||||
return n;
|
||||
};
|
||||
var me = {
|
||||
fold: function (n, s) {
|
||||
return n();
|
||||
},
|
||||
is: never,
|
||||
isSome: never,
|
||||
isNone: always,
|
||||
getOr: id,
|
||||
getOrThunk: call,
|
||||
getOrDie: function (msg) {
|
||||
throw new Error(msg || 'error: getOrDie called on none.');
|
||||
},
|
||||
getOrNull: constant(null),
|
||||
getOrUndefined: constant(undefined),
|
||||
or: id,
|
||||
orThunk: call,
|
||||
map: none,
|
||||
each: noop,
|
||||
bind: none,
|
||||
exists: never,
|
||||
forall: always,
|
||||
filter: none,
|
||||
equals: eq,
|
||||
equals_: eq,
|
||||
toArray: function () {
|
||||
return [];
|
||||
},
|
||||
toString: constant('none()')
|
||||
};
|
||||
if (Object.freeze) {
|
||||
Object.freeze(me);
|
||||
}
|
||||
return me;
|
||||
}();
|
||||
var some = function (a) {
|
||||
var constant_a = constant(a);
|
||||
var self = function () {
|
||||
return me;
|
||||
};
|
||||
var bind = function (f) {
|
||||
return f(a);
|
||||
};
|
||||
var me = {
|
||||
fold: function (n, s) {
|
||||
return s(a);
|
||||
},
|
||||
is: function (v) {
|
||||
return a === v;
|
||||
},
|
||||
isSome: always,
|
||||
isNone: never,
|
||||
getOr: constant_a,
|
||||
getOrThunk: constant_a,
|
||||
getOrDie: constant_a,
|
||||
getOrNull: constant_a,
|
||||
getOrUndefined: constant_a,
|
||||
or: self,
|
||||
orThunk: self,
|
||||
map: function (f) {
|
||||
return some(f(a));
|
||||
},
|
||||
each: function (f) {
|
||||
f(a);
|
||||
},
|
||||
bind: bind,
|
||||
exists: bind,
|
||||
forall: bind,
|
||||
filter: function (f) {
|
||||
return f(a) ? me : NONE;
|
||||
},
|
||||
toArray: function () {
|
||||
return [a];
|
||||
},
|
||||
toString: function () {
|
||||
return 'some(' + a + ')';
|
||||
},
|
||||
equals: function (o) {
|
||||
return o.is(a);
|
||||
},
|
||||
equals_: function (o, elementEq) {
|
||||
return o.fold(never, function (b) {
|
||||
return elementEq(a, b);
|
||||
});
|
||||
}
|
||||
};
|
||||
return me;
|
||||
};
|
||||
var from = function (value) {
|
||||
return value === null || value === undefined ? NONE : some(value);
|
||||
};
|
||||
var Option = {
|
||||
some: some,
|
||||
none: none,
|
||||
from: from
|
||||
};
|
||||
|
||||
var typeOf = function (x) {
|
||||
if (x === null) {
|
||||
return 'null';
|
||||
}
|
||||
var t = typeof x;
|
||||
if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) {
|
||||
return 'array';
|
||||
}
|
||||
if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) {
|
||||
return 'string';
|
||||
}
|
||||
return t;
|
||||
};
|
||||
var isType = function (type) {
|
||||
return function (value) {
|
||||
return typeOf(value) === type;
|
||||
};
|
||||
};
|
||||
var isFunction = isType('function');
|
||||
|
||||
var nativeSlice = Array.prototype.slice;
|
||||
var map = function (xs, f) {
|
||||
var len = xs.length;
|
||||
var r = new Array(len);
|
||||
for (var i = 0; i < len; i++) {
|
||||
var x = xs[i];
|
||||
r[i] = f(x, i);
|
||||
}
|
||||
return r;
|
||||
};
|
||||
var each = function (xs, f) {
|
||||
for (var i = 0, len = xs.length; i < len; i++) {
|
||||
var x = xs[i];
|
||||
f(x, i);
|
||||
}
|
||||
};
|
||||
var from$1 = isFunction(Array.from) ? Array.from : function (x) {
|
||||
return nativeSlice.call(x);
|
||||
};
|
||||
|
||||
var fromHtml = function (html, scope) {
|
||||
var doc = scope || domGlobals.document;
|
||||
var div = doc.createElement('div');
|
||||
div.innerHTML = html;
|
||||
if (!div.hasChildNodes() || div.childNodes.length > 1) {
|
||||
domGlobals.console.error('HTML does not have a single root node', html);
|
||||
throw new Error('HTML must have a single root node');
|
||||
}
|
||||
return fromDom(div.childNodes[0]);
|
||||
};
|
||||
var fromTag = function (tag, scope) {
|
||||
var doc = scope || domGlobals.document;
|
||||
var node = doc.createElement(tag);
|
||||
return fromDom(node);
|
||||
};
|
||||
var fromText = function (text, scope) {
|
||||
var doc = scope || domGlobals.document;
|
||||
var node = doc.createTextNode(text);
|
||||
return fromDom(node);
|
||||
};
|
||||
var fromDom = function (node) {
|
||||
if (node === null || node === undefined) {
|
||||
throw new Error('Node cannot be null or undefined');
|
||||
}
|
||||
return { dom: constant(node) };
|
||||
};
|
||||
var fromPoint = function (docElm, x, y) {
|
||||
var doc = docElm.dom();
|
||||
return Option.from(doc.elementFromPoint(x, y)).map(fromDom);
|
||||
};
|
||||
var Element = {
|
||||
fromHtml: fromHtml,
|
||||
fromTag: fromTag,
|
||||
fromText: fromText,
|
||||
fromDom: fromDom,
|
||||
fromPoint: fromPoint
|
||||
};
|
||||
|
||||
var ATTRIBUTE = domGlobals.Node.ATTRIBUTE_NODE;
|
||||
var CDATA_SECTION = domGlobals.Node.CDATA_SECTION_NODE;
|
||||
var COMMENT = domGlobals.Node.COMMENT_NODE;
|
||||
var DOCUMENT = domGlobals.Node.DOCUMENT_NODE;
|
||||
var DOCUMENT_TYPE = domGlobals.Node.DOCUMENT_TYPE_NODE;
|
||||
var DOCUMENT_FRAGMENT = domGlobals.Node.DOCUMENT_FRAGMENT_NODE;
|
||||
var ELEMENT = domGlobals.Node.ELEMENT_NODE;
|
||||
var TEXT = domGlobals.Node.TEXT_NODE;
|
||||
var PROCESSING_INSTRUCTION = domGlobals.Node.PROCESSING_INSTRUCTION_NODE;
|
||||
var ENTITY_REFERENCE = domGlobals.Node.ENTITY_REFERENCE_NODE;
|
||||
var ENTITY = domGlobals.Node.ENTITY_NODE;
|
||||
var NOTATION = domGlobals.Node.NOTATION_NODE;
|
||||
|
||||
var Global = typeof domGlobals.window !== 'undefined' ? domGlobals.window : Function('return this;')();
|
||||
|
||||
var type = function (element) {
|
||||
return element.dom().nodeType;
|
||||
};
|
||||
var value = function (element) {
|
||||
return element.dom().nodeValue;
|
||||
};
|
||||
var isType$1 = function (t) {
|
||||
return function (element) {
|
||||
return type(element) === t;
|
||||
};
|
||||
};
|
||||
var isText = isType$1(TEXT);
|
||||
|
||||
var charMap = {
|
||||
'\xA0': 'nbsp',
|
||||
'\xAD': 'shy'
|
||||
};
|
||||
var charMapToRegExp = function (charMap, global) {
|
||||
var key, regExp = '';
|
||||
for (key in charMap) {
|
||||
regExp += key;
|
||||
}
|
||||
return new RegExp('[' + regExp + ']', global ? 'g' : '');
|
||||
};
|
||||
var charMapToSelector = function (charMap) {
|
||||
var key, selector = '';
|
||||
for (key in charMap) {
|
||||
if (selector) {
|
||||
selector += ',';
|
||||
}
|
||||
selector += 'span.mce-' + charMap[key];
|
||||
}
|
||||
return selector;
|
||||
};
|
||||
var Data = {
|
||||
charMap: charMap,
|
||||
regExp: charMapToRegExp(charMap),
|
||||
regExpGlobal: charMapToRegExp(charMap, true),
|
||||
selector: charMapToSelector(charMap),
|
||||
charMapToRegExp: charMapToRegExp,
|
||||
charMapToSelector: charMapToSelector
|
||||
};
|
||||
|
||||
var wrapCharWithSpan = function (value) {
|
||||
return '<span data-mce-bogus="1" class="mce-' + Data.charMap[value] + '">' + value + '</span>';
|
||||
};
|
||||
var Html = { wrapCharWithSpan: wrapCharWithSpan };
|
||||
|
||||
var isMatch = function (n) {
|
||||
var value$1 = value(n);
|
||||
return isText(n) && value$1 !== undefined && Data.regExp.test(value$1);
|
||||
};
|
||||
var filterDescendants = function (scope, predicate) {
|
||||
var result = [];
|
||||
var dom = scope.dom();
|
||||
var children = map(dom.childNodes, Element.fromDom);
|
||||
each(children, function (x) {
|
||||
if (predicate(x)) {
|
||||
result = result.concat([x]);
|
||||
}
|
||||
result = result.concat(filterDescendants(x, predicate));
|
||||
});
|
||||
return result;
|
||||
};
|
||||
var findParentElm = function (elm, rootElm) {
|
||||
while (elm.parentNode) {
|
||||
if (elm.parentNode === rootElm) {
|
||||
return elm;
|
||||
}
|
||||
elm = elm.parentNode;
|
||||
}
|
||||
};
|
||||
var replaceWithSpans = function (text) {
|
||||
return text.replace(Data.regExpGlobal, Html.wrapCharWithSpan);
|
||||
};
|
||||
var Nodes = {
|
||||
isMatch: isMatch,
|
||||
filterDescendants: filterDescendants,
|
||||
findParentElm: findParentElm,
|
||||
replaceWithSpans: replaceWithSpans
|
||||
};
|
||||
|
||||
var show = function (editor, rootElm) {
|
||||
var node, div;
|
||||
var nodeList = Nodes.filterDescendants(Element.fromDom(rootElm), Nodes.isMatch);
|
||||
each(nodeList, function (n) {
|
||||
var withSpans = Nodes.replaceWithSpans(editor.dom.encode(value(n)));
|
||||
div = editor.dom.create('div', null, withSpans);
|
||||
while (node = div.lastChild) {
|
||||
editor.dom.insertAfter(node, n.dom());
|
||||
}
|
||||
editor.dom.remove(n.dom());
|
||||
});
|
||||
};
|
||||
var hide = function (editor, body) {
|
||||
var nodeList = editor.dom.select(Data.selector, body);
|
||||
each(nodeList, function (node) {
|
||||
editor.dom.remove(node, 1);
|
||||
});
|
||||
};
|
||||
var toggle = function (editor) {
|
||||
var body = editor.getBody();
|
||||
var bookmark = editor.selection.getBookmark();
|
||||
var parentNode = Nodes.findParentElm(editor.selection.getNode(), body);
|
||||
parentNode = parentNode !== undefined ? parentNode : body;
|
||||
hide(editor, parentNode);
|
||||
show(editor, parentNode);
|
||||
editor.selection.moveToBookmark(bookmark);
|
||||
};
|
||||
var VisualChars = {
|
||||
show: show,
|
||||
hide: hide,
|
||||
toggle: toggle
|
||||
};
|
||||
|
||||
var toggleVisualChars = function (editor, toggleState) {
|
||||
var body = editor.getBody();
|
||||
var selection = editor.selection;
|
||||
var bookmark;
|
||||
toggleState.set(!toggleState.get());
|
||||
Events.fireVisualChars(editor, toggleState.get());
|
||||
bookmark = selection.getBookmark();
|
||||
if (toggleState.get() === true) {
|
||||
VisualChars.show(editor, body);
|
||||
} else {
|
||||
VisualChars.hide(editor, body);
|
||||
}
|
||||
selection.moveToBookmark(bookmark);
|
||||
};
|
||||
var Actions = { toggleVisualChars: toggleVisualChars };
|
||||
|
||||
var register = function (editor, toggleState) {
|
||||
editor.addCommand('mceVisualChars', function () {
|
||||
Actions.toggleVisualChars(editor, toggleState);
|
||||
});
|
||||
};
|
||||
var Commands = { register: register };
|
||||
|
||||
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Delay');
|
||||
|
||||
var setup = function (editor, toggleState) {
|
||||
var debouncedToggle = global$1.debounce(function () {
|
||||
VisualChars.toggle(editor);
|
||||
}, 300);
|
||||
if (editor.settings.forced_root_block !== false) {
|
||||
editor.on('keydown', function (e) {
|
||||
if (toggleState.get() === true) {
|
||||
e.keyCode === 13 ? VisualChars.toggle(editor) : debouncedToggle();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
var Keyboard = { setup: setup };
|
||||
|
||||
var isEnabledByDefault = function (editor) {
|
||||
return editor.getParam('visualchars_default_state', false);
|
||||
};
|
||||
var Settings = { isEnabledByDefault: isEnabledByDefault };
|
||||
|
||||
var setup$1 = function (editor, toggleState) {
|
||||
editor.on('init', function () {
|
||||
var valueForToggling = !Settings.isEnabledByDefault(editor);
|
||||
toggleState.set(valueForToggling);
|
||||
Actions.toggleVisualChars(editor, toggleState);
|
||||
});
|
||||
};
|
||||
var Bindings = { setup: setup$1 };
|
||||
|
||||
var toggleActiveState = function (editor) {
|
||||
return function (e) {
|
||||
var ctrl = e.control;
|
||||
editor.on('VisualChars', function (e) {
|
||||
ctrl.active(e.state);
|
||||
});
|
||||
};
|
||||
};
|
||||
var register$1 = function (editor) {
|
||||
editor.addButton('visualchars', {
|
||||
active: false,
|
||||
title: 'Show invisible characters',
|
||||
cmd: 'mceVisualChars',
|
||||
onPostRender: toggleActiveState(editor)
|
||||
});
|
||||
editor.addMenuItem('visualchars', {
|
||||
text: 'Show invisible characters',
|
||||
cmd: 'mceVisualChars',
|
||||
onPostRender: toggleActiveState(editor),
|
||||
selectable: true,
|
||||
context: 'view',
|
||||
prependToContext: true
|
||||
});
|
||||
};
|
||||
|
||||
global.add('visualchars', function (editor) {
|
||||
var toggleState = Cell(false);
|
||||
Commands.register(editor, toggleState);
|
||||
register$1(editor);
|
||||
Keyboard.setup(editor, toggleState);
|
||||
Bindings.setup(editor, toggleState);
|
||||
return Api.get(toggleState);
|
||||
});
|
||||
function Plugin () {
|
||||
}
|
||||
|
||||
return Plugin;
|
||||
|
||||
}(window));
|
||||
})();
|
1
wp-content/plugins/tinymce-advanced/mce/visualchars/plugin.min.js
vendored
Normal file
1
wp-content/plugins/tinymce-advanced/mce/visualchars/plugin.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
233
wp-content/plugins/tinymce-advanced/mce/wptadv/plugin.js
Normal file
233
wp-content/plugins/tinymce-advanced/mce/wptadv/plugin.js
Normal file
|
@ -0,0 +1,233 @@
|
|||
/**
|
||||
* Additional functionality for TinyMCE.
|
||||
* @package advanced-editor-tools
|
||||
*/
|
||||
|
||||
( function( tinymce ) {
|
||||
tinymce.PluginManager.add( 'wptadv', function( editor ) {
|
||||
var noAutop = ( ! editor.settings.wpautop && editor.settings.tadv_noautop );
|
||||
|
||||
function addLineBreaks( html ) {
|
||||
var blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre' +
|
||||
'|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section' +
|
||||
'|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary';
|
||||
|
||||
html = html.replace( new RegExp( '<(?:' + blocklist + ')(?: [^>]*)?>', 'gi' ), '\n$&' );
|
||||
html = html.replace( new RegExp( '</(?:' + blocklist + ')>', 'gi' ), '$&\n' );
|
||||
html = html.replace( /(<br(?: [^>]*)?>)[\r\n\t]*/gi, '$1\n' );
|
||||
html = html.replace( />\n[\r\n\t]+</g, '>\n<' );
|
||||
html = html.replace( /^<li/gm, '\t<li' );
|
||||
html = html.replace( /<td>\u00a0<\/td>/g, '<td> </td>' );
|
||||
|
||||
return tinymce.trim( html );
|
||||
}
|
||||
|
||||
editor.addCommand( 'Tadv_Mark', function() {
|
||||
editor.formatter.toggle('mark');
|
||||
});
|
||||
|
||||
editor.addButton( 'tadv_mark', {
|
||||
icon: 'backcolor',
|
||||
tooltip: 'Mark',
|
||||
cmd: 'Tadv_Mark',
|
||||
stateSelector: 'mark'
|
||||
});
|
||||
|
||||
editor.on( 'init', function() {
|
||||
if ( noAutop ) {
|
||||
editor.on( 'SaveContent', function( event ) {
|
||||
event.content = event.content.replace( /caption\](\s|<br[^>]*>|<p> <\/p>)*\[caption/g, 'caption] [caption' );
|
||||
|
||||
event.content = event.content.replace( /<(object|audio|video)[\s\S]+?<\/\1>/g, function( match ) {
|
||||
return match.replace( /[\r\n\t ]+/g, ' ' );
|
||||
});
|
||||
|
||||
event.content = event.content.replace( /<pre( [^>]*)?>[\s\S]+?<\/pre>/g, function( match ) {
|
||||
match = match.replace( /<br ?\/?>(\r\n|\n)?/g, '\n' );
|
||||
return match.replace( /<\/?p( [^>]*)?>(\r\n|\n)?/g, '\n' );
|
||||
});
|
||||
|
||||
event.content = addLineBreaks( event.content );
|
||||
});
|
||||
}
|
||||
|
||||
try {
|
||||
if ( editor.plugins.searchreplace && ! editor.controlManager.buttons.searchreplace ) {
|
||||
editor.shortcuts.remove( 'meta+f' );
|
||||
}
|
||||
} catch ( er ) {}
|
||||
|
||||
editor.formatter.register({
|
||||
mark: { inline: 'mark' }
|
||||
});
|
||||
});
|
||||
|
||||
editor.on( 'ObjectResizeStart', function( event ) {
|
||||
var element = event.target;
|
||||
var table = editor.$( element );
|
||||
var parentWidth;
|
||||
var tableWidth;
|
||||
var width;
|
||||
|
||||
if ( table.is( 'table' ) ) {
|
||||
if ( element.style.width && element.style.width.indexOf( '%' ) !== -1 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
parentWidth = parseInt( table.parent().css( 'width' ), 10 );
|
||||
tableWidth = parseInt( event.width, 10 );
|
||||
|
||||
if ( parentWidth && tableWidth ) {
|
||||
if ( Math.abs( parentWidth - tableWidth ) < 3 ) {
|
||||
table.css({ width: '100%' });
|
||||
} else {
|
||||
width = Math.round( ( tableWidth / parentWidth ) * 100 );
|
||||
|
||||
if ( width > 10 && width < 200 ) {
|
||||
table.css({ width: width + '%' });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, true );
|
||||
|
||||
editor.addMenuItem( 'tmaresettablesize', {
|
||||
text: 'Reset table size',
|
||||
cmd: 'tmaResetTableSize',
|
||||
icon: 'dashicon dashicons-image-flip-horizontal',
|
||||
context: 'format',
|
||||
});
|
||||
|
||||
editor.addMenuItem( 'tmaremovetablestyles', {
|
||||
text: 'Remove table styling',
|
||||
cmd: 'tmaRemoveTableStyles',
|
||||
icon: 'dashicon dashicons-editor-table',
|
||||
context: 'format',
|
||||
});
|
||||
|
||||
editor.addButton( 'tmaresettablesize', {
|
||||
title: 'Reset table size',
|
||||
cmd: 'tmaResetTableSize',
|
||||
icon: 'dashicon dashicons-image-flip-horizontal',
|
||||
} );
|
||||
|
||||
editor.addButton( 'tmaremovetablestyles', {
|
||||
title: 'Remove table styling',
|
||||
cmd: 'tmaRemoveTableStyles',
|
||||
icon: 'dashicon dashicons-editor-table',
|
||||
} );
|
||||
|
||||
editor.addCommand( 'tmaRemoveTableStyles', function() {
|
||||
var node = editor.selection.getStart();
|
||||
var table = editor.dom.getParents( node, 'table' );
|
||||
var attr = {
|
||||
style: null,
|
||||
'data-mce-style': null,
|
||||
width: null,
|
||||
height: null,
|
||||
minWidth: null,
|
||||
maxWidth: null,
|
||||
minHeight: null,
|
||||
maxHeight: null,
|
||||
align: null,
|
||||
valign: null,
|
||||
axis: null,
|
||||
'char': null,
|
||||
charoff: null,
|
||||
bgcolor: null,
|
||||
border: null,
|
||||
cellspacing: null,
|
||||
cellpadding: null
|
||||
};
|
||||
|
||||
if ( table ) {
|
||||
editor.$( table ).attr( attr ).find( 'tr, th, td, thead, tbody, tfoot' ).each( function( i, element ) {
|
||||
editor.$( element ).attr( attr );
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
editor.addCommand( 'tmaResetTableSize', function() {
|
||||
var node = editor.selection.getStart();
|
||||
var table = editor.dom.getParents( node, 'table' );
|
||||
|
||||
if ( table ) {
|
||||
removeInlineSizes( null, table );
|
||||
|
||||
editor.$( table ).find( 'tr, th, td, thead, tbody, tfoot' ).each( removeInlineSizes );
|
||||
}
|
||||
} );
|
||||
|
||||
function removeInlineSizes( i, node ) {
|
||||
var element = editor.$( node );
|
||||
|
||||
element.attr( {
|
||||
width: null,
|
||||
height: null,
|
||||
minWidth: null,
|
||||
maxWidth: null,
|
||||
minHeight: null,
|
||||
maxHeight: null
|
||||
} );
|
||||
|
||||
element.css({ width: null, height: null });
|
||||
|
||||
if ( element.is( 'table' ) ) {
|
||||
element.css({ 'border-collapse': 'collapse', width: '100%;' });
|
||||
}
|
||||
|
||||
if ( ! element.attr( 'style' ) ) {
|
||||
element.attr({ style: null, 'data-mce-style': null });
|
||||
} else {
|
||||
element.attr( 'data-mce-style', element.attr( 'style' ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( noAutop ) {
|
||||
editor.on( 'beforeSetContent', function( event ) {
|
||||
var autop;
|
||||
var wp = window.wp;
|
||||
|
||||
if ( ! wp ) {
|
||||
return;
|
||||
}
|
||||
|
||||
autop = wp.editor && wp.editor.autop;
|
||||
|
||||
if ( ! autop ) {
|
||||
autop = wp.oldEditor && wp.oldEditor.autop;
|
||||
}
|
||||
|
||||
if ( event.load && autop && event.content && event.content.indexOf( '\n' ) > -1 && ! /<p>/i.test( event.content ) ) {
|
||||
event.content = autop( event.content );
|
||||
}
|
||||
}, true );
|
||||
|
||||
if ( editor.settings.classic_block_editor ) {
|
||||
editor.on( 'beforeGetContent', function( event ) {
|
||||
if ( event.format === 'raw' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var blocks = tinymce.$( '.block-editor-block-list__block' );
|
||||
|
||||
if ( blocks.length === 1 && blocks.attr( 'data-type' ) === 'core/freeform' ) {
|
||||
// Mark all paragraph tags inside a single freeform block so they are not stripped by the block editor...
|
||||
editor.$( 'p' ).each( function ( i, node ) {
|
||||
if ( ! node.hasAttributes() ) {
|
||||
editor.$( node ).attr( 'data-tadv-p', 'keep' );
|
||||
}
|
||||
} );
|
||||
} else {
|
||||
// Remove the above ugliness...
|
||||
editor.$( 'p[data-tadv-p]' ).removeAttr( 'data-tadv-p' );
|
||||
}
|
||||
}, true );
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
addLineBreaks: addLineBreaks
|
||||
};
|
||||
});
|
||||
}( window.tinymce ));
|
233
wp-content/plugins/tinymce-advanced/mce/wptadv/plugin.min.js
vendored
Normal file
233
wp-content/plugins/tinymce-advanced/mce/wptadv/plugin.min.js
vendored
Normal file
|
@ -0,0 +1,233 @@
|
|||
/**
|
||||
* Additional functionality for TinyMCE.
|
||||
* @package advanced-editor-tools
|
||||
*/
|
||||
|
||||
( function( tinymce ) {
|
||||
tinymce.PluginManager.add( 'wptadv', function( editor ) {
|
||||
var noAutop = ( ! editor.settings.wpautop && editor.settings.tadv_noautop );
|
||||
|
||||
function addLineBreaks( html ) {
|
||||
var blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre' +
|
||||
'|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section' +
|
||||
'|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary';
|
||||
|
||||
html = html.replace( new RegExp( '<(?:' + blocklist + ')(?: [^>]*)?>', 'gi' ), '\n$&' );
|
||||
html = html.replace( new RegExp( '</(?:' + blocklist + ')>', 'gi' ), '$&\n' );
|
||||
html = html.replace( /(<br(?: [^>]*)?>)[\r\n\t]*/gi, '$1\n' );
|
||||
html = html.replace( />\n[\r\n\t]+</g, '>\n<' );
|
||||
html = html.replace( /^<li/gm, '\t<li' );
|
||||
html = html.replace( /<td>\u00a0<\/td>/g, '<td> </td>' );
|
||||
|
||||
return tinymce.trim( html );
|
||||
}
|
||||
|
||||
editor.addCommand( 'Tadv_Mark', function() {
|
||||
editor.formatter.toggle('mark');
|
||||
});
|
||||
|
||||
editor.addButton( 'tadv_mark', {
|
||||
icon: 'backcolor',
|
||||
tooltip: 'Mark',
|
||||
cmd: 'Tadv_Mark',
|
||||
stateSelector: 'mark'
|
||||
});
|
||||
|
||||
editor.on( 'init', function() {
|
||||
if ( noAutop ) {
|
||||
editor.on( 'SaveContent', function( event ) {
|
||||
event.content = event.content.replace( /caption\](\s|<br[^>]*>|<p> <\/p>)*\[caption/g, 'caption] [caption' );
|
||||
|
||||
event.content = event.content.replace( /<(object|audio|video)[\s\S]+?<\/\1>/g, function( match ) {
|
||||
return match.replace( /[\r\n\t ]+/g, ' ' );
|
||||
});
|
||||
|
||||
event.content = event.content.replace( /<pre( [^>]*)?>[\s\S]+?<\/pre>/g, function( match ) {
|
||||
match = match.replace( /<br ?\/?>(\r\n|\n)?/g, '\n' );
|
||||
return match.replace( /<\/?p( [^>]*)?>(\r\n|\n)?/g, '\n' );
|
||||
});
|
||||
|
||||
event.content = addLineBreaks( event.content );
|
||||
});
|
||||
}
|
||||
|
||||
try {
|
||||
if ( editor.plugins.searchreplace && ! editor.controlManager.buttons.searchreplace ) {
|
||||
editor.shortcuts.remove( 'meta+f' );
|
||||
}
|
||||
} catch ( er ) {}
|
||||
|
||||
editor.formatter.register({
|
||||
mark: { inline: 'mark' }
|
||||
});
|
||||
});
|
||||
|
||||
editor.on( 'ObjectResizeStart', function( event ) {
|
||||
var element = event.target;
|
||||
var table = editor.$( element );
|
||||
var parentWidth;
|
||||
var tableWidth;
|
||||
var width;
|
||||
|
||||
if ( table.is( 'table' ) ) {
|
||||
if ( element.style.width && element.style.width.indexOf( '%' ) !== -1 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
parentWidth = parseInt( table.parent().css( 'width' ), 10 );
|
||||
tableWidth = parseInt( event.width, 10 );
|
||||
|
||||
if ( parentWidth && tableWidth ) {
|
||||
if ( Math.abs( parentWidth - tableWidth ) < 3 ) {
|
||||
table.css({ width: '100%' });
|
||||
} else {
|
||||
width = Math.round( ( tableWidth / parentWidth ) * 100 );
|
||||
|
||||
if ( width > 10 && width < 200 ) {
|
||||
table.css({ width: width + '%' });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, true );
|
||||
|
||||
editor.addMenuItem( 'tmaresettablesize', {
|
||||
text: 'Reset table size',
|
||||
cmd: 'tmaResetTableSize',
|
||||
icon: 'dashicon dashicons-image-flip-horizontal',
|
||||
context: 'format',
|
||||
});
|
||||
|
||||
editor.addMenuItem( 'tmaremovetablestyles', {
|
||||
text: 'Remove table styling',
|
||||
cmd: 'tmaRemoveTableStyles',
|
||||
icon: 'dashicon dashicons-editor-table',
|
||||
context: 'format',
|
||||
});
|
||||
|
||||
editor.addButton( 'tmaresettablesize', {
|
||||
title: 'Reset table size',
|
||||
cmd: 'tmaResetTableSize',
|
||||
icon: 'dashicon dashicons-image-flip-horizontal',
|
||||
} );
|
||||
|
||||
editor.addButton( 'tmaremovetablestyles', {
|
||||
title: 'Remove table styling',
|
||||
cmd: 'tmaRemoveTableStyles',
|
||||
icon: 'dashicon dashicons-editor-table',
|
||||
} );
|
||||
|
||||
editor.addCommand( 'tmaRemoveTableStyles', function() {
|
||||
var node = editor.selection.getStart();
|
||||
var table = editor.dom.getParents( node, 'table' );
|
||||
var attr = {
|
||||
style: null,
|
||||
'data-mce-style': null,
|
||||
width: null,
|
||||
height: null,
|
||||
minWidth: null,
|
||||
maxWidth: null,
|
||||
minHeight: null,
|
||||
maxHeight: null,
|
||||
align: null,
|
||||
valign: null,
|
||||
axis: null,
|
||||
'char': null,
|
||||
charoff: null,
|
||||
bgcolor: null,
|
||||
border: null,
|
||||
cellspacing: null,
|
||||
cellpadding: null
|
||||
};
|
||||
|
||||
if ( table ) {
|
||||
editor.$( table ).attr( attr ).find( 'tr, th, td, thead, tbody, tfoot' ).each( function( i, element ) {
|
||||
editor.$( element ).attr( attr );
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
editor.addCommand( 'tmaResetTableSize', function() {
|
||||
var node = editor.selection.getStart();
|
||||
var table = editor.dom.getParents( node, 'table' );
|
||||
|
||||
if ( table ) {
|
||||
removeInlineSizes( null, table );
|
||||
|
||||
editor.$( table ).find( 'tr, th, td, thead, tbody, tfoot' ).each( removeInlineSizes );
|
||||
}
|
||||
} );
|
||||
|
||||
function removeInlineSizes( i, node ) {
|
||||
var element = editor.$( node );
|
||||
|
||||
element.attr( {
|
||||
width: null,
|
||||
height: null,
|
||||
minWidth: null,
|
||||
maxWidth: null,
|
||||
minHeight: null,
|
||||
maxHeight: null
|
||||
} );
|
||||
|
||||
element.css({ width: null, height: null });
|
||||
|
||||
if ( element.is( 'table' ) ) {
|
||||
element.css({ 'border-collapse': 'collapse', width: '100%;' });
|
||||
}
|
||||
|
||||
if ( ! element.attr( 'style' ) ) {
|
||||
element.attr({ style: null, 'data-mce-style': null });
|
||||
} else {
|
||||
element.attr( 'data-mce-style', element.attr( 'style' ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( noAutop ) {
|
||||
editor.on( 'beforeSetContent', function( event ) {
|
||||
var autop;
|
||||
var wp = window.wp;
|
||||
|
||||
if ( ! wp ) {
|
||||
return;
|
||||
}
|
||||
|
||||
autop = wp.editor && wp.editor.autop;
|
||||
|
||||
if ( ! autop ) {
|
||||
autop = wp.oldEditor && wp.oldEditor.autop;
|
||||
}
|
||||
|
||||
if ( event.load && autop && event.content && event.content.indexOf( '\n' ) > -1 && ! /<p>/i.test( event.content ) ) {
|
||||
event.content = autop( event.content );
|
||||
}
|
||||
}, true );
|
||||
|
||||
if ( editor.settings.classic_block_editor ) {
|
||||
editor.on( 'beforeGetContent', function( event ) {
|
||||
if ( event.format === 'raw' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var blocks = tinymce.$( '.block-editor-block-list__block' );
|
||||
|
||||
if ( blocks.length === 1 && blocks.attr( 'data-type' ) === 'core/freeform' ) {
|
||||
// Mark all paragraph tags inside a single freeform block so they are not stripped by the block editor...
|
||||
editor.$( 'p' ).each( function ( i, node ) {
|
||||
if ( ! node.hasAttributes() ) {
|
||||
editor.$( node ).attr( 'data-tadv-p', 'keep' );
|
||||
}
|
||||
} );
|
||||
} else {
|
||||
// Remove the above ugliness...
|
||||
editor.$( 'p[data-tadv-p]' ).removeAttr( 'data-tadv-p' );
|
||||
}
|
||||
}, true );
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
addLineBreaks: addLineBreaks
|
||||
};
|
||||
});
|
||||
}( window.tinymce ));
|
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 508 B |
1005
wp-content/plugins/tinymce-advanced/plugin-assets/tadv.css
Normal file
1005
wp-content/plugins/tinymce-advanced/plugin-assets/tadv.css
Normal file
File diff suppressed because it is too large
Load diff
249
wp-content/plugins/tinymce-advanced/plugin-assets/tadv.js
Normal file
249
wp-content/plugins/tinymce-advanced/plugin-assets/tadv.js
Normal file
|
@ -0,0 +1,249 @@
|
|||
/**
|
||||
* Scripts for the settings screen in wp-admin.
|
||||
* @package advanced-editor-tools
|
||||
*/
|
||||
|
||||
jQuery( document ).ready( function( $ ) {
|
||||
var $importElement = $('#tadv-import');
|
||||
var $importError = $('#tadv-import-error');
|
||||
|
||||
function sortClassic() {
|
||||
var container = $('.container');
|
||||
|
||||
if ( container.sortable( 'instance' ) ) {
|
||||
container.sortable( 'destroy' );
|
||||
}
|
||||
|
||||
container.sortable({
|
||||
connectWith: '.container',
|
||||
items: '> li',
|
||||
cursor: 'move',
|
||||
stop: function( event, ui ) {
|
||||
var toolbar_id;
|
||||
|
||||
if ( ui && ( toolbar_id = ui.item.parent().attr('id') ) ) {
|
||||
ui.item.find('input.tadv-button').attr('name', toolbar_id + '[]');
|
||||
}
|
||||
},
|
||||
activate: function( event, ui ) {
|
||||
$(this).parent().addClass( 'highlighted' );
|
||||
},
|
||||
deactivate: function( event, ui ) {
|
||||
$(this).parent().removeClass( 'highlighted' );
|
||||
},
|
||||
revert: 300,
|
||||
opacity: 0.7,
|
||||
placeholder: 'tadv-placeholder',
|
||||
forcePlaceholderSize: true
|
||||
});
|
||||
}
|
||||
|
||||
function sortBlock() {
|
||||
var classicBlock = $( '.container-classic-block' );
|
||||
var block = $( '.container-block' );
|
||||
var blockToolbar = $( '#toolbar_block' );
|
||||
|
||||
if ( classicBlock.sortable( 'instance' ) ) {
|
||||
classicBlock.sortable( 'destroy' );
|
||||
}
|
||||
|
||||
if ( block.sortable( 'instance' ) ) {
|
||||
block.sortable( 'destroy' );
|
||||
}
|
||||
|
||||
if ( blockToolbar.sortable( 'instance' ) ) {
|
||||
blockToolbar.sortable( 'destroy' );
|
||||
}
|
||||
|
||||
classicBlock.sortable({
|
||||
connectWith: '.container-classic-block',
|
||||
items: '> li',
|
||||
cursor: 'move',
|
||||
stop: function( event, ui ) {
|
||||
var toolbar_id = ui.item.parent().attr( 'id' );
|
||||
resetItemName( toolbar_id, ui.item );
|
||||
},
|
||||
activate: function( event, ui ) {
|
||||
$(this).parent().addClass( 'highlighted' );
|
||||
},
|
||||
deactivate: function( event, ui ) {
|
||||
$(this).parent().removeClass( 'highlighted' );
|
||||
},
|
||||
revert: 300,
|
||||
opacity: 0.7,
|
||||
placeholder: 'tadv-placeholder',
|
||||
forcePlaceholderSize: true
|
||||
});
|
||||
|
||||
blockToolbar.sortable({
|
||||
connectWith: '.container-block',
|
||||
items: '> li',
|
||||
cursor: 'move',
|
||||
stop: function( event, ui ) {
|
||||
var toolbar_id = ui.item.parent().attr( 'id' );
|
||||
|
||||
resetItemName( toolbar_id, ui.item );
|
||||
sortBlockToolbar();
|
||||
},
|
||||
activate: function( event, ui ) {
|
||||
$(this).parent().addClass( 'highlighted' );
|
||||
},
|
||||
deactivate: function( event, ui ) {
|
||||
$(this).parent().removeClass( 'highlighted' );
|
||||
},
|
||||
revert: 300,
|
||||
opacity: 0.7,
|
||||
placeholder: 'tadv-placeholder',
|
||||
forcePlaceholderSize: true
|
||||
});
|
||||
|
||||
block.sortable({
|
||||
connectWith: '.container-block, #toolbar_block',
|
||||
items: '> li',
|
||||
cursor: 'move',
|
||||
stop: function( event, ui ) {
|
||||
var toolbar_id = ui.item.parent().attr( 'id' );
|
||||
|
||||
resetItemName( toolbar_id, ui.item );
|
||||
sortBlockToolbar();
|
||||
},
|
||||
activate: function( event, ui ) {
|
||||
$(this).parent().addClass( 'highlighted' );
|
||||
},
|
||||
deactivate: function( event, ui ) {
|
||||
$(this).parent().removeClass( 'highlighted' );
|
||||
},
|
||||
receive: function( event, ui ) {
|
||||
if (
|
||||
$( event.target ).is( '#toolbar_block_side' ) &&
|
||||
( ui.item.is( 'li.core-image' ) || ui.item.is( 'li.core-text-color' ) )
|
||||
) {
|
||||
block.sortable( 'cancel' );
|
||||
}
|
||||
},
|
||||
revert: 300,
|
||||
opacity: 0.7,
|
||||
placeholder: 'tadv-block-placeholder',
|
||||
forcePlaceholderSize: true
|
||||
});
|
||||
}
|
||||
|
||||
function resetItemName( name, item ) {
|
||||
if ( name ) {
|
||||
item.find( 'input[type="hidden"]' ).attr( 'name', name + '[]' );
|
||||
}
|
||||
}
|
||||
|
||||
function sortBlockToolbar() {
|
||||
var container = $( '#toolbar_block' );
|
||||
var items = container.find( 'li' );
|
||||
|
||||
items.sort( function ( a, b ) {
|
||||
var aa = $( a ).find( 'div' ).attr( 'title' );
|
||||
var bb = $( b ).find( 'div' ).attr( 'title' );
|
||||
|
||||
return ( aa > bb ) ? 1 : -1;
|
||||
});
|
||||
|
||||
container.append( items );
|
||||
}
|
||||
|
||||
// Make block editor tab sortable on load
|
||||
sortBlock();
|
||||
|
||||
$( '.settings-toggle.block' ).on( 'focus', function( event ) {
|
||||
$( '.wrap' ).removeClass( 'classic-active' ).addClass( 'block-active' );
|
||||
sortBlock();
|
||||
});
|
||||
|
||||
$( '.settings-toggle.classic' ).on( 'focus', function( event ) {
|
||||
$( '.wrap' ).removeClass( 'block-active' ).addClass( 'classic-active' );
|
||||
sortClassic();
|
||||
});
|
||||
|
||||
$( '#menubar' ).on( 'change', function() {
|
||||
$( '.tadv-mce-menu.tadv-classic-editor' ).toggleClass( 'enabled', $(this).prop('checked') );
|
||||
});
|
||||
|
||||
$( '#menubar_block' ).on( 'change', function() {
|
||||
$( '.tadv-mce-menu.tadv-block-editor' ).toggleClass( 'enabled', $(this).prop('checked') );
|
||||
});
|
||||
|
||||
$( '#tadvadmins' ).on( 'submit', function() {
|
||||
$( 'ul.container' ).each( function( i, node ) {
|
||||
$( node ).find( '.tadv-button' ).attr( 'name', node.id ? node.id + '[]' : '' );
|
||||
});
|
||||
});
|
||||
|
||||
$( 'input[name="selected_text_color"]' ).on( 'change', function() {
|
||||
if ( this.id === 'selected_text_color_yes' ) {
|
||||
$( '.panel-block-text-color' ).removeClass( 'disabled' );
|
||||
} else {
|
||||
$( '.panel-block-text-color' ).addClass( 'disabled' );
|
||||
}
|
||||
} );
|
||||
|
||||
$( 'input[name="selected_text_background_color"]' ).on( 'change', function() {
|
||||
if ( this.id === 'selected_text_background_color_yes' ) {
|
||||
$( '.panel-block-background-color' ).removeClass( 'disabled' );
|
||||
} else {
|
||||
$( '.panel-block-background-color' ).addClass( 'disabled' );
|
||||
}
|
||||
} );
|
||||
|
||||
$( '.tadv-popout-help-toggle, .tadv-popout-help-close' ).on( 'click', function( event ) {
|
||||
$( '.tadv-popout-help' ).toggleClass( 'hidden' );
|
||||
} );
|
||||
|
||||
$('#tadv-export-select').click( function() {
|
||||
$('#tadv-export').focus().select();
|
||||
});
|
||||
|
||||
$importElement.change( function() {
|
||||
$importError.empty();
|
||||
});
|
||||
|
||||
$('#tadv-import-verify').click( function() {
|
||||
var string;
|
||||
|
||||
string = ( $importElement.val() || '' ).replace( /^[^{]*/, '' ).replace( /[^}]*$/, '' );
|
||||
$importElement.val( string );
|
||||
|
||||
try {
|
||||
JSON.parse( string );
|
||||
$importError.text( 'No errors.' );
|
||||
} catch( error ) {
|
||||
$importError.text( error );
|
||||
}
|
||||
});
|
||||
|
||||
function translate( str ) {
|
||||
if ( window.tadvTranslation.hasOwnProperty( str ) ) {
|
||||
return window.tadvTranslation[str];
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
if ( typeof window.tadvTranslation === 'object' ) {
|
||||
$( '.tadvitem' ).each( function( i, element ) {
|
||||
var $element = $( element ),
|
||||
$descr = $element.find( '.descr' ),
|
||||
text = $descr.text();
|
||||
|
||||
if ( text ) {
|
||||
text = translate( text );
|
||||
$descr.text( text );
|
||||
$element.find( '.mce-ico' ).attr( 'title', text );
|
||||
}
|
||||
});
|
||||
|
||||
$( '.tadv-mce-menu .tadv-translate' ).each( function( i, element ) {
|
||||
var $element = $( element ),
|
||||
text = $element.text();
|
||||
|
||||
if ( text ) {
|
||||
$element.text( translate( text ) );
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue