first commit
This commit is contained in:
@@ -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 );
|
||||
|
||||
} );
|
||||
4
wp-content/plugins/flexible-checkout-fields/assets/js/admin-notice.min.js
vendored
Normal file
4
wp-content/plugins/flexible-checkout-fields/assets/js/admin-notice.min.js
vendored
Normal 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)})
|
||||
@@ -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);
|
||||
2
wp-content/plugins/flexible-checkout-fields/assets/js/admin.min.js
vendored
Normal file
2
wp-content/plugins/flexible-checkout-fields/assets/js/admin.min.js
vendored
Normal 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)
|
||||
@@ -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/>');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
1
wp-content/plugins/flexible-checkout-fields/assets/js/checkout.min.js
vendored
Normal file
1
wp-content/plugins/flexible-checkout-fields/assets/js/checkout.min.js
vendored
Normal 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
@@ -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
@@ -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.
|
||||
*/
|
||||
Reference in New Issue
Block a user