first commit

This commit is contained in:
2024-11-10 21:08:49 +01:00
commit 0d932ce5ee
14455 changed files with 2567501 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
jQuery( document ).ready( function() {
var notice_selector = '[data-notice="fcf-admin-notice"]';
var button_close_selector = '.notice-dismiss';
var button_hide_selector = '[data-notice-button]';
var notice_wrapper = document.querySelector( notice_selector );
if ( ! notice_wrapper ) {
return;
}
var close_notice = function ( is_permanently ) {
jQuery.ajax(
notice_wrapper.getAttribute( 'data-notice-url' ),
{
type: 'POST',
data: {
action: notice_wrapper.getAttribute( 'data-notice-action' ),
is_permanently: ( is_permanently ) ? 1 : 0,
},
}
);
if ( is_permanently ) {
notice_wrapper.querySelector( button_close_selector ).click();
}
}
var click_on_close = function( e ) {
notice_wrapper.removeEventListener( 'click', click_on_close );
if ( e.target.matches( button_close_selector ) ) {
close_notice( false );
} else if ( e.target.matches( button_hide_selector ) ) {
close_notice( true );
}
}
notice_wrapper.addEventListener( 'click', click_on_close );
} );

View File

@@ -0,0 +1,4 @@
jQuery(document).ready(function(){var notice_selector='[data-notice="fcf-admin-notice"]';var button_close_selector='.notice-dismiss';var button_hide_selector='[data-notice-button]';var notice_wrapper=document.querySelector(notice_selector);if(!notice_wrapper){return}
var close_notice=function(is_permanently){jQuery.ajax(notice_wrapper.getAttribute('data-notice-url'),{type:'POST',data:{action:notice_wrapper.getAttribute('data-notice-action'),is_permanently:(is_permanently)?1:0,},});if(is_permanently){notice_wrapper.querySelector(button_close_selector).click()}}
var click_on_close=function(e){notice_wrapper.removeEventListener('click',click_on_close);if(e.target.matches(button_close_selector)){close_notice(!1)}else if(e.target.matches(button_hide_selector)){close_notice(!0)}}
notice_wrapper.addEventListener('click',click_on_close)})

View File

@@ -0,0 +1,22 @@
(function($) {
$(function() {
var i = 0;
$('.post-type-shop_order .edit_address .form-field').each(function () {
if($(this).width() != 100){
if(i % 2 == 0){
$(this).addClass('form-left');
}
else{
$(this).addClass('form-right');
}
i++;
}
else{
i = 0;
}
});
});
})(jQuery);

View File

@@ -0,0 +1,2 @@
(function($){$(function(){var i=0;$('.post-type-shop_order .edit_address .form-field').each(function(){if($(this).width()!=100){if(i%2==0){$(this).addClass('form-left')}else{$(this).addClass('form-right')}
i++}else{i=0}})})})(jQuery)

View File

@@ -0,0 +1,68 @@
jQuery(document).on("click",".inspire-file-add-button",function() {
jQuery(this).parent().find('input[type=file]').click();
});
jQuery(document).on("click",".inspire-file-delete-button",function() {
jQuery(this).parent().find('input[type=file]').val('');
jQuery(this).parent().find('input[type=text]').val('');
jQuery(this).parent().find('.inspire-file-info').empty();
jQuery(this).parent().find('.inspire-file-info').hide();
jQuery(this).parent().find('.inspire-file-delete-button').hide();
jQuery(this).parent().find('.inspire-file-add-button').show();
jQuery(this).parent().find('input[type=text]').trigger('change');
});
jQuery(document).on("change",".inspire-file-file",function() {
var id = jQuery(this).parent().attr('id');
var $file_info = jQuery('#' + id).find('.inspire-file-info');
var $file_error = jQuery('#' + id).find('.inspire-file-error');
var $file_add_button = jQuery('#' + id).find('.inspire-file-add-button');
$file_info.empty();
$file_error.empty();
$file_error.hide();
$file_info.show();
$file_info.append( words.uploading );
jQuery(this).parent().find('input[type=text]').val(jQuery(this).val());
$file_add_button.hide();
var fd = new FormData();
var file = jQuery(this).prop('files')[0];
var filename = file.name;
fd.append(jQuery(this).attr('field_name'), file);
fd.append( 'action', 'cf_upload' );
fd.append( 'inspire_upload_nonce', inspire_upload_nonce );
jQuery('#place_order').prop('disabled',true);
jQuery.ajax({
type: 'POST',
url: fcf_ajaxurl,
data: fd,
contentType: false,
processData: false,
success: function(response){
jQuery('#place_order').prop('disabled',false);
if ( response != 0 ) {
response = JSON.parse(response);
if ( response.status != 'ok' ) {
$file_add_button.show();
$file_info.empty();
$file_info.hide();
$file_error.empty();
$file_error.append( response.message + '<br/>' );
$file_error.show();
jQuery('#' + id).find('.inspire-file-file').val('');
jQuery('#' + id).find('.inspire-file').val('');
jQuery('#' + id).find('.inspire-file').trigger('change');
}
else {
jQuery('#' + id).find('.inspire-file-delete-button').show();
$file_error.empty();
$file_error.hide();
$file_info.empty();
$file_info.show();
$file_info.append(filename + '<br/>');
}
}
}
});
});

View File

@@ -0,0 +1 @@
jQuery(document).on("click",".inspire-file-add-button",function(){jQuery(this).parent().find('input[type=file]').click()});jQuery(document).on("click",".inspire-file-delete-button",function(){jQuery(this).parent().find('input[type=file]').val('');jQuery(this).parent().find('input[type=text]').val('');jQuery(this).parent().find('.inspire-file-info').empty();jQuery(this).parent().find('.inspire-file-info').hide();jQuery(this).parent().find('.inspire-file-delete-button').hide();jQuery(this).parent().find('.inspire-file-add-button').show();jQuery(this).parent().find('input[type=text]').trigger('change')});jQuery(document).on("change",".inspire-file-file",function(){var id=jQuery(this).parent().attr('id');var $file_info=jQuery('#'+id).find('.inspire-file-info');var $file_error=jQuery('#'+id).find('.inspire-file-error');var $file_add_button=jQuery('#'+id).find('.inspire-file-add-button');$file_info.empty();$file_error.empty();$file_error.hide();$file_info.show();$file_info.append(words.uploading);jQuery(this).parent().find('input[type=text]').val(jQuery(this).val());$file_add_button.hide();var fd=new FormData();var file=jQuery(this).prop('files')[0];var filename=file.name;fd.append(jQuery(this).attr('field_name'),file);fd.append('action','cf_upload');fd.append('inspire_upload_nonce',inspire_upload_nonce);jQuery('#place_order').prop('disabled',!0);jQuery.ajax({type:'POST',url:fcf_ajaxurl,data:fd,contentType:!1,processData:!1,success:function(response){jQuery('#place_order').prop('disabled',!1);if(response!=0){response=JSON.parse(response);if(response.status!='ok'){$file_add_button.show();$file_info.empty();$file_info.hide();$file_error.empty();$file_error.append(response.message+'<br/>');$file_error.show();jQuery('#'+id).find('.inspire-file-file').val('');jQuery('#'+id).find('.inspire-file').val('');jQuery('#'+id).find('.inspire-file').trigger('change')}else{jQuery('#'+id).find('.inspire-file-delete-button').show();$file_error.empty();$file_error.hide();$file_info.empty();$file_info.show();$file_info.append(filename+'<br/>')}}}})})

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,41 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/** @license React v0.20.2
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
/*!
* vanilla-picker v2.12.1
* https://vanilla-picker.js.org
*
* Copyright 2017-2021 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate)
* Released under the ISC license.
*/