Plugin Tabs noticias
7
Wordpress/wordpress/wp-content/plugins/all-bootstrap-blocks/assets/css/bootstrap.min.css
vendored
Normal file
1
Wordpress/wordpress/wp-content/plugins/all-bootstrap-blocks/assets/css/select2.min.css
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 26.5.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 61.7 14.1" style="enable-background:new 0 0 61.7 14.1;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FF7676;}
|
||||
.st1{fill:#FFFFFF;}
|
||||
</style>
|
||||
<path class="st0" d="M6.8,0L0.6,14.1l0,0c2,0,3.8-1.2,4.6-3L10.1,0H6.8z"/>
|
||||
<path class="st1" d="M10.8,10.9c1.3,0,2.5,0.5,3.4,1.4l-3.4-7.7l-3.4,7.7C8.3,11.5,9.5,10.9,10.8,10.9z"/>
|
||||
<path class="st0" d="M23.3,8l1.2,1.7c0.2,0.3,0.1,0.8-0.3,1c-0.3,0.2-0.8,0.1-1-0.2l-1.4-2.3h-0.7v1.9c0,0.4-0.3,0.7-0.8,0.7
|
||||
c-0.4,0-0.8-0.3-0.8-0.7V4.3c0-0.4,0.3-0.8,0.7-0.8h2.2c1.6,0,2.4,1.2,2.4,2.3C24.9,6.8,24.3,7.7,23.3,8z M21.1,4.9v2h1.4
|
||||
c0.6,0,0.9-0.5,0.9-1s-0.3-1-0.9-1H21.1z"/>
|
||||
<path class="st0" d="M31.8,3.3c2.1,0,3.7,1.7,3.7,3.8c0,2-1.6,3.7-3.7,3.7s-3.7-1.7-3.7-3.7C28.1,5,29.8,3.3,31.8,3.3z M31.8,9.3
|
||||
c1.2,0,2.1-1,2.1-2.2S33,4.9,31.8,4.9c-1.2,0-2.1,1-2.1,2.2S30.6,9.3,31.8,9.3z"/>
|
||||
<path class="st1" d="M51.7,9.1l-0.5,1.3c-0.1,0.4-0.6,0.5-1,0.4c-0.4-0.1-0.6-0.6-0.5-1l2.1-5.6c0.2-0.4,0.5-0.7,1-0.7h0.1
|
||||
c0.5,0,0.9,0.3,1,0.7L56,9.8c0.1,0.4-0.1,0.8-0.5,1c-0.4,0.1-0.8,0-1-0.4l-0.4-1.3H51.7z M53.6,7.7l-0.7-2.5l-0.7,2.5H53.6z"/>
|
||||
<path class="st1" d="M61.2,10.1c0,0.4-0.3,0.7-0.8,0.7c-0.4,0-0.8-0.3-0.8-0.7V4.2c0-0.4,0.4-0.7,0.8-0.7c0.4,0,0.8,0.3,0.8,0.7
|
||||
V10.1z"/>
|
||||
<path class="st0" d="M40.6,10.1c0,0.4-0.3,0.7-0.8,0.7c-0.4,0-0.8-0.3-0.8-0.7V4.2c0-0.4,0.4-0.7,0.8-0.7c0.4,0,0.8,0.3,0.8,0.7
|
||||
V10.1z"/>
|
||||
<circle class="st0" cx="45" cy="10" r="0.8"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 26.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 64.9 14.1" style="enable-background:new 0 0 64.9 14.1;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#42E695;}
|
||||
.st1{fill:#1C1C2A;}
|
||||
</style>
|
||||
<path class="st0" d="M6.8,0L0.6,14.1l0,0c2,0,3.8-1.2,4.6-3L10.1,0H6.8z"/>
|
||||
<path class="st1" d="M10.8,10.9c1.3,0,2.5,0.5,3.4,1.4l-3.4-7.7l-3.4,7.7C8.3,11.5,9.5,10.9,10.8,10.9z"/>
|
||||
<path class="st0" d="M21.5,9L21,10.3c-0.1,0.4-0.6,0.5-1,0.4s-0.6-0.6-0.5-1l2.1-5.6c0.2-0.4,0.5-0.7,1-0.7h0.1c0.5,0,0.9,0.3,1,0.7
|
||||
l2.1,5.6c0.1,0.4-0.1,0.8-0.5,1c-0.4,0.1-0.8,0-1-0.4L23.9,9H21.5z M23.4,7.6l-0.7-2.5L22,7.6H23.4z"/>
|
||||
<path class="st0" d="M34,7.9l1.2,1.7c0.2,0.3,0.1,0.8-0.3,1c-0.3,0.2-0.8,0.1-1-0.2l-1.4-2.3h-0.7V10c0,0.4-0.3,0.7-0.8,0.7
|
||||
c-0.4,0-0.8-0.3-0.8-0.7V4.2c0-0.4,0.3-0.8,0.7-0.8h2.2c1.6,0,2.4,1.2,2.4,2.3C35.6,6.7,35,7.6,34,7.9z M31.8,4.8v2h1.4
|
||||
c0.6,0,0.9-0.5,0.9-1s-0.3-1-0.9-1H31.8z"/>
|
||||
<path class="st0" d="M44.7,3.4c0.3,0,0.6,0.3,0.6,0.7c0,0.3-0.3,0.7-0.6,0.7h-2.4v1.7h2.1c0.3,0,0.6,0.3,0.6,0.7
|
||||
c0,0.3-0.3,0.7-0.6,0.7h-2.1v1.6h2.5c0.3,0,0.6,0.3,0.6,0.7c0,0.3-0.3,0.7-0.6,0.7h-3.4c-0.4,0-0.6-0.3-0.6-0.7V4.1
|
||||
c0-0.4,0.2-0.7,0.6-0.7L44.7,3.4z"/>
|
||||
<path class="st1" d="M53.3,3.3C55.4,3.3,57,5,57,7.1c0,2-1.6,3.7-3.7,3.7c-2.1,0-3.7-1.7-3.7-3.7C49.6,5,51.3,3.3,53.3,3.3z
|
||||
M53.3,9.3c1.2,0,2.1-1,2.1-2.2s-0.9-2.2-2.1-2.2c-1.2,0-2.1,1-2.1,2.2S52.1,9.3,53.3,9.3z"/>
|
||||
<path class="st1" d="M64.3,10c0,0.4-0.3,0.7-0.8,0.7c-0.4,0-0.8-0.3-0.8-0.7V4.1c0-0.4,0.4-0.7,0.8-0.7c0.4,0,0.8,0.3,0.8,0.7V10z"
|
||||
/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 26.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 64.9 14.1" style="enable-background:new 0 0 64.9 14.1;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#ff7676;}
|
||||
.st1{fill:#ffffff;}
|
||||
</style>
|
||||
<path class="st0" d="M6.8,0L0.6,14.1l0,0c2,0,3.8-1.2,4.6-3L10.1,0H6.8z"/>
|
||||
<path class="st1" d="M10.8,10.9c1.3,0,2.5,0.5,3.4,1.4l-3.4-7.7l-3.4,7.7C8.3,11.5,9.5,10.9,10.8,10.9z"/>
|
||||
<path class="st0" d="M21.5,9L21,10.3c-0.1,0.4-0.6,0.5-1,0.4s-0.6-0.6-0.5-1l2.1-5.6c0.2-0.4,0.5-0.7,1-0.7h0.1c0.5,0,0.9,0.3,1,0.7
|
||||
l2.1,5.6c0.1,0.4-0.1,0.8-0.5,1c-0.4,0.1-0.8,0-1-0.4L23.9,9H21.5z M23.4,7.6l-0.7-2.5L22,7.6H23.4z"/>
|
||||
<path class="st0" d="M34,7.9l1.2,1.7c0.2,0.3,0.1,0.8-0.3,1c-0.3,0.2-0.8,0.1-1-0.2l-1.4-2.3h-0.7V10c0,0.4-0.3,0.7-0.8,0.7
|
||||
c-0.4,0-0.8-0.3-0.8-0.7V4.2c0-0.4,0.3-0.8,0.7-0.8h2.2c1.6,0,2.4,1.2,2.4,2.3C35.6,6.7,35,7.6,34,7.9z M31.8,4.8v2h1.4
|
||||
c0.6,0,0.9-0.5,0.9-1s-0.3-1-0.9-1H31.8z"/>
|
||||
<path class="st0" d="M44.7,3.4c0.3,0,0.6,0.3,0.6,0.7c0,0.3-0.3,0.7-0.6,0.7h-2.4v1.7h2.1c0.3,0,0.6,0.3,0.6,0.7
|
||||
c0,0.3-0.3,0.7-0.6,0.7h-2.1v1.6h2.5c0.3,0,0.6,0.3,0.6,0.7c0,0.3-0.3,0.7-0.6,0.7h-3.4c-0.4,0-0.6-0.3-0.6-0.7V4.1
|
||||
c0-0.4,0.2-0.7,0.6-0.7L44.7,3.4z"/>
|
||||
<path class="st1" d="M53.3,3.3C55.4,3.3,57,5,57,7.1c0,2-1.6,3.7-3.7,3.7c-2.1,0-3.7-1.7-3.7-3.7C49.6,5,51.3,3.3,53.3,3.3z
|
||||
M53.3,9.3c1.2,0,2.1-1,2.1-2.2s-0.9-2.2-2.1-2.2c-1.2,0-2.1,1-2.1,2.2S52.1,9.3,53.3,9.3z"/>
|
||||
<path class="st1" d="M64.3,10c0,0.4-0.3,0.7-0.8,0.7c-0.4,0-0.8-0.3-0.8-0.7V4.1c0-0.4,0.4-0.7,0.8-0.7c0.4,0,0.8,0.3,0.8,0.7V10z"
|
||||
/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1 @@
|
||||
<svg style="color: #fff;" xmlns="http://www.w3.org/2000/svg" width="40" height="32" class="d-block my-1" viewBox="0 0 118 94" role="img"><title>Bootstrap</title><path fill-rule="evenodd" clip-rule="evenodd" d="M24.509 0c-6.733 0-11.715 5.893-11.492 12.284.214 6.14-.064 14.092-2.066 20.577C8.943 39.365 5.547 43.485 0 44.014v5.972c5.547.529 8.943 4.649 10.951 11.153 2.002 6.485 2.28 14.437 2.066 20.577C12.794 88.106 17.776 94 24.51 94H93.5c6.733 0 11.714-5.893 11.491-12.284-.214-6.14.064-14.092 2.066-20.577 2.009-6.504 5.396-10.624 10.943-11.153v-5.972c-5.547-.529-8.934-4.649-10.943-11.153-2.002-6.484-2.28-14.437-2.066-20.577C105.214 5.894 100.233 0 93.5 0H24.508zM80 57.863C80 66.663 73.436 72 62.543 72H44a2 2 0 01-2-2V24a2 2 0 012-2h18.437c9.083 0 15.044 4.92 15.044 12.474 0 5.302-4.01 10.049-9.119 10.88v.277C75.317 46.394 80 51.21 80 57.863zM60.521 28.34H49.948v14.934h8.905c6.884 0 10.68-2.772 10.68-7.727 0-4.643-3.264-7.207-9.012-7.207zM49.948 49.2v16.458H60.91c7.167 0 10.964-2.876 10.964-8.281 0-5.406-3.903-8.178-11.425-8.178H49.948z" fill="currentColor"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 141 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 355 KiB |
|
After Width: | Height: | Size: 125 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
@@ -0,0 +1,366 @@
|
||||
if( typeof jQuery!=='undefined' ) {
|
||||
jQuery(function($){
|
||||
|
||||
$( document ).ready( function() {
|
||||
|
||||
var api_url = typeof window.wpApiSettings.root != 'undefined' ? window.wpApiSettings.root : '/wp-json/';
|
||||
|
||||
if ( typeof wp !== 'undefined' && typeof wp.data !== 'undefined' ) {
|
||||
let previousBlocks = [];
|
||||
|
||||
let insertedBlock = null;
|
||||
|
||||
function flattenBlocks(blocks) {
|
||||
let flatBlocks = [];
|
||||
|
||||
blocks.forEach(block => {
|
||||
flatBlocks.push(block);
|
||||
if (block.innerBlocks && block.innerBlocks.length > 0) {
|
||||
flatBlocks = flatBlocks.concat(flattenBlocks(block.innerBlocks));
|
||||
}
|
||||
});
|
||||
|
||||
return flatBlocks;
|
||||
}
|
||||
|
||||
wp.data.subscribe(() => {
|
||||
if ( !wp.data.select('core/block-editor') ) {
|
||||
return;
|
||||
}
|
||||
const currentBlocks = wp.data.select('core/block-editor').getBlocks();
|
||||
const flatCurrentBlocks = flattenBlocks(currentBlocks);
|
||||
|
||||
if (flatCurrentBlocks.length > previousBlocks.length && previousBlocks.length > 0) {
|
||||
|
||||
const newBlock = flatCurrentBlocks.find(block => {
|
||||
return !previousBlocks.some(prevBlock => prevBlock.clientId === block.clientId);
|
||||
});
|
||||
|
||||
if ( newBlock && ( !insertedBlock || newBlock.attributes.block_id != insertedBlock.attributes.block_id ) ) {
|
||||
insertedBlock = newBlock;
|
||||
wp.data.dispatch( 'core/block-editor' ).updateBlockAttributes( newBlock.clientId, { block_id: null });
|
||||
|
||||
if ( newBlock.innerBlocks.length ) {
|
||||
newBlock.innerBlocks.forEach(( block ) => {
|
||||
wp.data.dispatch( 'core/block-editor' ).updateBlockAttributes( block.clientId, { block_id: null, parent_id: null });
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
previousBlocks = flatCurrentBlocks;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Admin Fields
|
||||
*
|
||||
* Manage the maipulation of field options
|
||||
* within the admin area
|
||||
*
|
||||
*/
|
||||
$( document ).on( 'click', '.areoi-toggle-field', function(e) {
|
||||
e.preventDefault();
|
||||
var row = $( this ).parents( '.areoi-variable-row' );
|
||||
row.toggleClass( 'areoi-is-variable' );
|
||||
} );
|
||||
|
||||
$( document ).on( 'change', '.areoi-select-variable', function(e) {
|
||||
e.preventDefault();
|
||||
var input = $( this ).parent( '.areoi-field' ).find( '.areoi-input-text' ),
|
||||
value = $( this ).val();
|
||||
input.val( value );
|
||||
input.trigger( 'change' );
|
||||
$( this ).val( '' )
|
||||
} );
|
||||
|
||||
$( document ).on( 'change', '.areoi-select-theme-json', function(e) {
|
||||
e.preventDefault();
|
||||
var input = $( this ).parent( '.areoi-field' ).find( '.areoi-input-text' ),
|
||||
value = $( this ).val();
|
||||
input.val( 'theme-json-' + value );
|
||||
input.trigger( 'change' );
|
||||
$( this ).val( '' )
|
||||
} );
|
||||
|
||||
$( document ).on( 'change', '.areoi-select-bootstrap-class', function(e) {
|
||||
e.preventDefault();
|
||||
var container = $( this ).parents( '.components-base-control__field' ),
|
||||
input = container.find( 'input' ),
|
||||
value = input.val() + ' ' + $( this ).val();
|
||||
|
||||
const wp = window.wp;
|
||||
const data = wp.data.select( 'core/block-editor' );
|
||||
const selected = data.getSelectedBlock();
|
||||
|
||||
wp.data.dispatch( 'core/block-editor' ).updateBlockAttributes( selected.clientId, { className: value });
|
||||
|
||||
$( this ).val( '' )
|
||||
} );
|
||||
|
||||
$( document ).on( 'change', '.areoi-form-table input', function(e) {
|
||||
e.preventDefault();
|
||||
var row = $( this ).parents( '.areoi-row-input' ),
|
||||
color = $( this ).val(),
|
||||
cp = row.find( '.areoi-colour-picker' ),
|
||||
cp_container = row.find( '.wp-picker-container' );
|
||||
|
||||
if ( cp.length ) {
|
||||
if ( !CheckValidColor( color ) ) {
|
||||
cp.iris( 'color', '' );
|
||||
cp.val( '' );
|
||||
cp_container.find( '.wp-color-result' ).css( 'background-color', '' );
|
||||
cp_container.find( '.color-alpha' ).css( 'background-color', '' );
|
||||
} else {
|
||||
cp.iris( 'color', color );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
$( document ).on( 'change', '.areoi-form-table .areoi-font-picker', function(e) {
|
||||
e.preventDefault();
|
||||
var row = $( this ).parents( '.areoi-row-input' ),
|
||||
font = $( this ).val(),
|
||||
input = row.find( '.areoi-input-text' );
|
||||
|
||||
input.val( font );
|
||||
} );
|
||||
|
||||
$( document ).on( 'change', '.areoi-form-table .areoi-google-font-picker', function(e) {
|
||||
e.preventDefault();
|
||||
var row = $( this ).parents( '.areoi-row-input' ),
|
||||
font = $( this ).val(),
|
||||
input = row.find( '.areoi-input-text' );
|
||||
|
||||
input.val( font );
|
||||
} );
|
||||
|
||||
function CheckValidColor(color) {
|
||||
var e = document.getElementById('divValidColor');
|
||||
if (!e) {
|
||||
e = document.createElement('div');
|
||||
e.id = 'divValidColor';
|
||||
}
|
||||
e.style.borderColor = '';
|
||||
e.style.borderColor = color;
|
||||
var tmpcolor = e.style.borderColor;
|
||||
if (tmpcolor.length == 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
$('.areoi-colour-picker').wpColorPicker({
|
||||
change: function( event, ui ) {
|
||||
var element = event.target;
|
||||
var row = $( element ).parents( '.areoi-row-input' )
|
||||
var color = ui.color.to_s();
|
||||
var input = row.find( '.areoi-input-text' );
|
||||
input.val( color );
|
||||
}
|
||||
});
|
||||
|
||||
$( document ).on( 'click', '.areoi-reset', function(e) {
|
||||
e.preventDefault();
|
||||
var id = $( this ).data( 'id' ),
|
||||
input = $( '#' + id ),
|
||||
row = $( this ).parents( '.areoi-row-input' ),
|
||||
default_value = input.data( 'default' ),
|
||||
cp = row.find( '.areoi-colour-picker' ),
|
||||
cp_container = row.find( '.wp-picker-container' ),
|
||||
fp = row.find( '.areoi-font-picker' );
|
||||
|
||||
if ( cp.length ) {
|
||||
if ( !CheckValidColor( default_value ) ) {
|
||||
cp.iris( 'color', '' );
|
||||
cp.val( '' );
|
||||
cp_container.find( '.wp-color-result' ).css( 'background-color', '' );
|
||||
cp_container.find( '.color-alpha' ).css( 'background-color', '' );
|
||||
} else {
|
||||
cp.iris( 'color', default_value );
|
||||
}
|
||||
}
|
||||
if ( fp.length ) {
|
||||
fp.val( default_value );
|
||||
}
|
||||
if ( input.attr( 'type' ) == 'checkbox' ) {
|
||||
if ( default_value == 1 ) {
|
||||
input.prop( 'checked', 'checked' );
|
||||
} else {
|
||||
input.prop( 'checked', false );
|
||||
}
|
||||
} else {
|
||||
if ( typeof default_value !== 'undefined' ) {
|
||||
input.val( default_value );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
$( '.areoi-font-picker' ).select2();
|
||||
$( '.areoi-font-picker' ).on('select2:open', function (e) {
|
||||
setTimeout( function() {
|
||||
var items = $( '.select2-results__option' );
|
||||
items.each( function() {
|
||||
$( this ).css( {
|
||||
'font-family': $( this ).text(),
|
||||
'font-size': '22px'
|
||||
});
|
||||
});
|
||||
}, 500);
|
||||
});
|
||||
|
||||
$( '.areoi-select-variable' ).select2({
|
||||
ajax: {
|
||||
url: api_url + 'areoi/variables',
|
||||
dataType: 'json',
|
||||
delay: 500
|
||||
}
|
||||
});
|
||||
$( '.areoi-select-variable' ).on( 'select2:select', function (e) {
|
||||
$( this ).val( null ).trigger( 'change.select2' );
|
||||
});
|
||||
|
||||
$( '.areoi-select-theme-json' ).select2({
|
||||
ajax: {
|
||||
url: api_url + 'areoi/theme-json',
|
||||
dataType: 'json',
|
||||
delay: 500,
|
||||
}
|
||||
});
|
||||
$( '.areoi-select-theme-json' ).on( 'select2:select', function (e) {
|
||||
$( this ).val( null ).trigger( 'change.select2' );
|
||||
});
|
||||
|
||||
$( document ).on( 'click', '.areoi-form-button button', function(e) {
|
||||
e.preventDefault();
|
||||
var type = $( this ).data( 'type' ),
|
||||
refer = $( '[name="_wp_http_referer"]' ),
|
||||
_wp_http_referer = refer.val();
|
||||
|
||||
var url = new URL( window.location );
|
||||
|
||||
var search_params = url.searchParams;
|
||||
|
||||
search_params.set( 'save_type', type );
|
||||
|
||||
url.search = search_params.toString();
|
||||
|
||||
refer.val( url.toString() );
|
||||
|
||||
$( '.areoi-form' ).trigger( 'submit' );
|
||||
});
|
||||
$( document ).on( 'submit', '.areoi-form', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var container = $( '.areoi-form-button' ),
|
||||
spinner = container.find( '.spinner' ),
|
||||
submit = container.find( '.areoi-form-button__group' );
|
||||
|
||||
submit.hide();
|
||||
spinner.addClass( 'is-active' );
|
||||
|
||||
var data = $( this ).serializeArray(),
|
||||
url = $( this ).attr( 'action' ),
|
||||
type = $( this ).attr( 'method' );
|
||||
|
||||
$.ajax({
|
||||
type: type,
|
||||
url: url,
|
||||
data: data
|
||||
}).done(function (data) {
|
||||
location.reload();
|
||||
}).fail(function (data) {
|
||||
$( '.areoi-form-button__alert' ).addClass( 'active' ).text( data.responseText );
|
||||
submit.show();
|
||||
spinner.removeClass( 'is-active' );
|
||||
|
||||
setTimeout( function() {
|
||||
$( '.areoi-form-button__alert' ).removeClass( 'active' );
|
||||
}, 5000);
|
||||
});
|
||||
} );
|
||||
|
||||
|
||||
// Media upload functionality
|
||||
$('body').on( 'click', '.areoi-upl', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var button = $(this),
|
||||
container = button.parents( '.areoi-variable-row' ),
|
||||
custom_uploader = wp.media({
|
||||
title: 'Insert image',
|
||||
library : {
|
||||
type : 'image'
|
||||
},
|
||||
button: {
|
||||
text: 'Use this image'
|
||||
},
|
||||
multiple: false
|
||||
}).on('select', function() {
|
||||
var attachment = custom_uploader.state().get('selection').first().toJSON();
|
||||
button.html('<img src="' + attachment.url + '" class="areoi-image-w-border" style="width: 100%; height: auto;">');
|
||||
container.find( 'input' ).val( attachment.url );
|
||||
container.addClass( 'with-image' );
|
||||
}).open();
|
||||
});
|
||||
|
||||
// on remove button click
|
||||
$('body').on('click', '.areoi-rmv', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
var button = $(this),
|
||||
container = button.parents( '.areoi-row-input' );
|
||||
|
||||
container.find( 'input' ).val( '' );
|
||||
container.find( '.areoi-upl-container' ).removeClass( 'with-image' );
|
||||
});
|
||||
|
||||
var interval = setInterval( function() {
|
||||
var label = $( 'label:contains(Additional CSS class(es))' );
|
||||
|
||||
if ( label.length ) {
|
||||
var container = label.parent(),
|
||||
input = container.find( 'input' ),
|
||||
select = container.find( 'select' );
|
||||
|
||||
if ( !select.length ) {
|
||||
|
||||
var html = `
|
||||
<div style="margin: 10px 0; position: relative;">
|
||||
<select class="areoi-select-bootstrap-class" name="areoi-select-bootstrap-class">
|
||||
<option value="">Add Bootstrap class</option>
|
||||
</select>
|
||||
</div>
|
||||
`;
|
||||
$( html ).insertBefore( input );
|
||||
|
||||
$( '.areoi-select-bootstrap-class' ).select2({
|
||||
ajax: {
|
||||
url: api_url + 'areoi/bootstrap-classes',
|
||||
dataType: 'json',
|
||||
delay: 500
|
||||
}
|
||||
});
|
||||
$( '.areoi-select-bootstrap-class' ).on( 'select2:select', function (e) {
|
||||
$( this ).val( null ).trigger( 'change.select2' );
|
||||
});
|
||||
}
|
||||
}
|
||||
}, 10);
|
||||
|
||||
/**
|
||||
* Admin Layout
|
||||
*
|
||||
* Manage the maipulation of layout elements
|
||||
* within the admin area
|
||||
*
|
||||
*/
|
||||
// Toggle accordion headers
|
||||
$( document ).on( 'click', '.areoi-card-header', function(e) {
|
||||
e.preventDefault();
|
||||
var card = $( this ).parents( '.areoi-card' );
|
||||
card.toggleClass( 'active' );
|
||||
} );
|
||||
});
|
||||
});
|
||||
}
|
||||
149
Wordpress/wordpress/wp-content/plugins/all-bootstrap-blocks/assets/js/bootstrap-extra.js
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
var popoverTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]'));
|
||||
var popoverList = popoverTriggerList.map(function (popoverTriggerEl) {
|
||||
return new bootstrap.Popover(popoverTriggerEl);
|
||||
});
|
||||
|
||||
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
|
||||
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
|
||||
return new bootstrap.Tooltip(tooltipTriggerEl);
|
||||
});
|
||||
|
||||
var modals = document.getElementsByClassName("modal");
|
||||
var modal_links = [];
|
||||
for (var i = 0; i < modals.length; i++) {
|
||||
var modal = modals.item(i);
|
||||
var links = document.querySelectorAll("[href=\'#" + modal.id + "\']");
|
||||
if ( !links.length ) {
|
||||
continue;
|
||||
}
|
||||
for (var modal_i = 0; modal_i < links.length; modal_i++) {
|
||||
modal_links.push( links.item(modal_i) );
|
||||
}
|
||||
}
|
||||
if ( modal_links.length ) {
|
||||
modal_links.forEach( function( link ) {
|
||||
link.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
var id = link.href.split("#");
|
||||
var modal = new bootstrap.Modal(document.getElementById(id[1]), {
|
||||
keyboard: true
|
||||
});
|
||||
modal.show();
|
||||
}, false );
|
||||
});
|
||||
}
|
||||
|
||||
var collapses = document.getElementsByClassName("collapse");
|
||||
var collapse_links = [];
|
||||
for (var i = 0; i < collapses.length; i++) {
|
||||
var collapse = collapses.item(i);
|
||||
var links = document.querySelectorAll("[href=\'#" + collapse.id + "\']");
|
||||
|
||||
if ( !links.length ) {
|
||||
continue;
|
||||
}
|
||||
for (var link_i = 0; link_i < links.length; link_i++) {
|
||||
collapse_links.push( links.item(link_i) );
|
||||
}
|
||||
}
|
||||
if ( collapse_links.length ) {
|
||||
collapse_links.forEach( function( link ) {
|
||||
link.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
var id = link.href.split("#");
|
||||
var collapse = new bootstrap.Collapse(document.getElementById(id[1]), {
|
||||
keyboard: false
|
||||
});
|
||||
collapse.toggle();
|
||||
}, false );
|
||||
});
|
||||
}
|
||||
|
||||
var offcanvass = document.getElementsByClassName("offcanvas");
|
||||
var offcanvas_links = [];
|
||||
for (var i = 0; i < offcanvass.length; i++) {
|
||||
var offcanvas = offcanvass.item(i);
|
||||
var links = document.querySelectorAll("[href=\'#" + offcanvas.id + "\']");
|
||||
|
||||
if ( !links.length ) {
|
||||
continue;
|
||||
}
|
||||
for (var link_i = 0; link_i < links.length; link_i++) {
|
||||
offcanvas_links.push( links.item(link_i) );
|
||||
}
|
||||
}
|
||||
if ( offcanvas_links.length ) {
|
||||
offcanvas_links.forEach( function( link ) {
|
||||
link.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
var id = link.href.split("#");
|
||||
var offcanvas = new bootstrap.Offcanvas(document.getElementById(id[1]), {
|
||||
keyboard: false
|
||||
});
|
||||
offcanvas.show();
|
||||
}, false );
|
||||
});
|
||||
}
|
||||
|
||||
var toasts = document.getElementsByClassName("toast");
|
||||
var toast_links = [];
|
||||
for (var i = 0; i < toasts.length; i++) {
|
||||
var toast = toasts.item(i);
|
||||
var links = document.querySelectorAll("[href=\'#" + toast.id + "\']");
|
||||
|
||||
if ( !links.length ) {
|
||||
continue;
|
||||
}
|
||||
for (var link_i = 0; link_i < links.length; link_i++) {
|
||||
toast_links.push( links.item(link_i) );
|
||||
}
|
||||
}
|
||||
if ( toast_links.length ) {
|
||||
toast_links.forEach( function( link ) {
|
||||
link.addEventListener("click", function(event) {
|
||||
event.preventDefault();
|
||||
var id = link.href.split("#");
|
||||
var toast = new bootstrap.Toast(document.getElementById(id[1]), {
|
||||
keyboard: false,
|
||||
});
|
||||
toast.show();
|
||||
}, false );
|
||||
});
|
||||
}
|
||||
|
||||
jQuery(document).ready(function($){
|
||||
|
||||
$( '.areoi-tabs' ).each( function() {
|
||||
|
||||
var active = $( this ).find( '.nav a.active:first-of-type' );
|
||||
|
||||
$( this ).find( '.nav a.active:not(:first-of-type)' ).removeClass( 'active' );
|
||||
|
||||
$( this ).find( '> div' ).addClass( 'tab-pane d-none' );
|
||||
|
||||
var active_tab = $( this ).find( active.attr( 'href' ) );
|
||||
|
||||
if ( active_tab ) {
|
||||
active_tab.removeClass( 'd-none' );
|
||||
}
|
||||
});
|
||||
|
||||
$( document ).on( 'click', '.areoi-tabs .nav a', function( e ) {
|
||||
var href = $(this).attr('href');
|
||||
if (href && href.startsWith('#')) {
|
||||
e.preventDefault();
|
||||
|
||||
var container = $( this ).parents( '.areoi-tabs' );
|
||||
var active_tab = container.find( $( this ).attr( 'href' ) );
|
||||
|
||||
container.find( '.nav a' ).removeClass( 'active' );
|
||||
$( this ).addClass( 'active' );
|
||||
|
||||
if ( active_tab ) {
|
||||
container.find( '> div' ).addClass( 'd-none' );
|
||||
active_tab.removeClass( 'd-none' );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
});
|
||||