add payments by invoice
This commit is contained in:
@@ -1,19 +1,22 @@
|
||||
@if(!defined('LOAD_TINYMCE'))
|
||||
@if (!defined('LOAD_TINYMCE'))
|
||||
@push('js')
|
||||
<script src="/assets/plugins/tinymce/jquery.tinymce.min.js"></script>
|
||||
<script src="/assets/plugins/tinymce/tinymce.min.js"></script>
|
||||
@component('boilerplate::minify')
|
||||
<script>
|
||||
|
||||
tinymce.defaultSettings = {
|
||||
path_absolute : "/",
|
||||
plugins: "autolink autoresize fullscreen codemirror link lists table media preview image paste customalign stickytoolbar",
|
||||
path_absolute: "/",
|
||||
plugins: "autolink autoresize fullscreen codemirror link lists table media preview image paste customalign",
|
||||
toolbar: "insertfile undo redo | styleselect | bold italic underline | customalignleft aligncenter customalignright | link media image | bullist numlist | table | code fullscreen",
|
||||
contextmenu: "link image imagetools table spellchecker bold italic underline",
|
||||
sticky_toolbar_container: '.tox-editor-header',
|
||||
toolbar_drawer: "sliding",
|
||||
sticky_offset: $('nav.main-header').outerHeight(),
|
||||
codemirror: { config: { theme: 'storm' } },
|
||||
codemirror: {
|
||||
config: {
|
||||
theme: 'storm'
|
||||
}
|
||||
},
|
||||
menubar: false,
|
||||
removed_menuitems: 'newdocument',
|
||||
remove_linebreaks: false,
|
||||
@@ -27,15 +30,21 @@
|
||||
encoding: 'UTF-8',
|
||||
image_uploadtab: false,
|
||||
paste_preprocess: function(plugin, args) {
|
||||
args.content = args.content.replace(/<(\/)*(\\?xml:|meta|link|span|font|del|ins|st1:|[ovwxp]:)((.|\s)*?)>/gi, ''); // Unwanted tags
|
||||
args.content = args.content.replace(/\s(class|style|type|start)=("(.*?)"|(\w*))/gi, ''); // Unwanted attributes
|
||||
args.content = args.content.replace(/<(p|a|div|span|strike|strong|i|u)[^>]*?>(\s| |<br\/>|\r|\n)*?<\/(p|a|div|span|strike|strong|i|u)>/gi, ''); // Empty tags
|
||||
args.content = args.content.replace(
|
||||
/<(\/)*(\\?xml:|meta|link|span|font|del|ins|st1:|[ovwxp]:)((.|\s)*?)>/gi, ''); // Unwanted tags
|
||||
args.content = args.content.replace(/\s(class|style|type|start)=("(.*?)"|(\w*))/gi,
|
||||
''); // Unwanted attributes
|
||||
args.content = args.content.replace(
|
||||
/<(p|a|div|span|strike|strong|i|u)[^>]*?>(\s| |<br\/>|\r|\n)*?<\/(p|a|div|span|strike|strong|i|u)>/gi,
|
||||
''); // Empty tags
|
||||
},
|
||||
skin : "boilerplate",
|
||||
skin: "boilerplate",
|
||||
language: '{{ App::getLocale() }}',
|
||||
file_picker_callback : function(callback, value, meta) {
|
||||
var x = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
|
||||
var y = window.innerHeight|| document.documentElement.clientHeight|| document.getElementsByTagName('body')[0].clientHeight;
|
||||
file_picker_callback: function(callback, value, meta) {
|
||||
var x = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName(
|
||||
'body')[0].clientWidth;
|
||||
var y = window.innerHeight || document.documentElement.clientHeight || document
|
||||
.getElementsByTagName('body')[0].clientHeight;
|
||||
|
||||
var cmsURL = tinymce.defaultSettings.path_absolute + 'filemanager?editor=' + meta.fieldname;
|
||||
if (meta.filetype == 'image') {
|
||||
@@ -45,12 +54,12 @@
|
||||
}
|
||||
|
||||
tinyMCE.activeEditor.windowManager.openUrl({
|
||||
url : cmsURL,
|
||||
title : 'Filemanager',
|
||||
width : x * 0.8,
|
||||
height : y * 0.8,
|
||||
resizable : "yes",
|
||||
close_previous : "no",
|
||||
url: cmsURL,
|
||||
title: 'Filemanager',
|
||||
width: x * 0.8,
|
||||
height: y * 0.8,
|
||||
resizable: "yes",
|
||||
close_previous: "no",
|
||||
onMessage: (api, message) => {
|
||||
callback(message.content);
|
||||
}
|
||||
@@ -60,7 +69,8 @@
|
||||
|
||||
// Prevent Bootstrap dialog from blocking focusin
|
||||
$(document).on('focusin', function(e) {
|
||||
if ($(e.target).closest(".tox-tinymce, .tox-tinymce-aux, .moxman-window, .tam-assetmanager-root").length) {
|
||||
if ($(e.target).closest(".tox-tinymce, .tox-tinymce-aux, .moxman-window, .tam-assetmanager-root")
|
||||
.length) {
|
||||
e.stopImmediatePropagation();
|
||||
}
|
||||
});
|
||||
@@ -70,19 +80,18 @@
|
||||
var options = (typeof(options) == 'undefined') ? {} : options;
|
||||
var setup = {
|
||||
setup: function(ed) {
|
||||
if ($('#'+ed.id).prop('readonly')) {
|
||||
if ($('#' + ed.id).prop('readonly')) {
|
||||
ed.settings.readonly = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
options = Object.assign(options, setup);
|
||||
|
||||
for (var i = tinymce.editors.length - 1 ; i > -1 ; i--) {
|
||||
for (var i = tinymce.editors.length - 1; i > -1; i--) {
|
||||
tinyMCE.execCommand("mceRemoveEditor", true, tinymce.editors[i].id);
|
||||
}
|
||||
$(selector).tinymce(options);
|
||||
}
|
||||
|
||||
</script>
|
||||
@endcomponent
|
||||
@endpush
|
||||
|
||||
@@ -1,51 +1,50 @@
|
||||
@if(!defined('LOAD_SELECT2'))
|
||||
@push('scripts')
|
||||
<script src="/assets/plugins/select2/js/select2.full.min.js"></script>
|
||||
<script src="/assets/plugins/select2/js/i18n/{{ App::getLocale() }}.js"></script>
|
||||
@if (!defined('LOAD_SELECT2'))
|
||||
@push('scripts')
|
||||
<script src="/assets/plugins/select2/js/select2.full.min.js"></script>
|
||||
<script src="/assets/plugins/select2/js/i18n/{{ App::getLocale() }}.js"></script>
|
||||
|
||||
<script>
|
||||
function initSelect2(sel, parent) {
|
||||
console.log('initSelect2');
|
||||
// $.fn.modal.Constructor.prototype.enforceFocus = function() {};
|
||||
<script>
|
||||
function initSelect2(sel, parent) {
|
||||
// $.fn.modal.Constructor.prototype.enforceFocus = function() {};
|
||||
|
||||
var selector = (typeof(sel) == 'undefined') ? '.select2' : sel;
|
||||
var selector = (typeof(sel) == 'undefined') ? '.select2' : sel;
|
||||
|
||||
if (typeof(parent) == 'undefined') {
|
||||
$(selector).select2({
|
||||
placeholder: "{{ __('select_a_value') }}",
|
||||
allowClear: false,
|
||||
width: {
|
||||
value: '100%'
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$(selector).select2({
|
||||
placeholder: "{{ __('select_a_value') }}",
|
||||
allowClear: true,
|
||||
dropdownParent: $(parent),
|
||||
width: {
|
||||
value: '100%'
|
||||
}
|
||||
});
|
||||
}
|
||||
/*
|
||||
$(selector).on('select2:open',(e) => {
|
||||
let t = $(e.target);
|
||||
console.log(t);
|
||||
if (t && t.length) {
|
||||
let id = t[0].id || t[0].name;
|
||||
console.log(id);
|
||||
let item = $(`input[aria-controls*='${id}']`);
|
||||
console.log(item);
|
||||
return item ? item.focus() : false;
|
||||
}
|
||||
});
|
||||
*/
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
@push('css')
|
||||
<link rel="stylesheet" href="/assets/plugins/select2/css/select2.min.css">
|
||||
@endpush
|
||||
@php(define('LOAD_SELECT2', true))
|
||||
@endif
|
||||
if (typeof(parent) == 'undefined') {
|
||||
$(selector).select2({
|
||||
placeholder: "{{ __('select_a_value') }}",
|
||||
allowClear: false,
|
||||
width: {
|
||||
value: '100%'
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$(selector).select2({
|
||||
placeholder: "{{ __('select_a_value') }}",
|
||||
allowClear: true,
|
||||
dropdownParent: $(parent),
|
||||
width: {
|
||||
value: '100%'
|
||||
}
|
||||
});
|
||||
}
|
||||
/*
|
||||
$(selector).on('select2:open',(e) => {
|
||||
let t = $(e.target);
|
||||
console.log(t);
|
||||
if (t && t.length) {
|
||||
let id = t[0].id || t[0].name;
|
||||
console.log(id);
|
||||
let item = $(`input[aria-controls*='${id}']`);
|
||||
console.log(item);
|
||||
return item ? item.focus() : false;
|
||||
}
|
||||
});
|
||||
*/
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
@push('css')
|
||||
<link rel="stylesheet" href="/assets/plugins/select2/css/select2.min.css">
|
||||
@endpush
|
||||
@php(define('LOAD_SELECT2', true))
|
||||
@endif
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
@if(!defined('LOAD_FILEINPUT'))
|
||||
@if (!defined('LOAD_FILEINPUT'))
|
||||
@push('css')
|
||||
<link rel="stylesheet" href="/assets/plugins/bootstrap-fileinput/css/fileinput.min.css">
|
||||
@endpush
|
||||
@push('scripts')
|
||||
<script src="/assets/plugins/bootstrap-fileinput/js/fileinput.min.js"></script>
|
||||
@if(App::getLocale() !== 'en')
|
||||
@if (App::getLocale() !== 'en')
|
||||
<script src="/assets/plugins/bootstrap-fileinput/js/locales/{{ App::getLocale() }}.js"></script>
|
||||
<script src="/assets/plugins/bootstrap-fileinput/themes/fas/theme.min.js"></script>
|
||||
<script>
|
||||
$.fn.fileinput.defaults.language = '{{ App::getLocale() }}';
|
||||
</script>
|
||||
@@ -17,41 +16,44 @@
|
||||
// console.log(options);
|
||||
var selector = (typeof(sel) == 'undefined') ? '.fileinput' : sel;
|
||||
$(selector).fileinput(options)
|
||||
.on("filebatchselected", function(event, files) {
|
||||
$(selector).fileinput("upload");
|
||||
}).on('fileuploaded', function (event, data, previewId, index, fileId) {
|
||||
// console.log('File uploaded', previewId, index, fileId);
|
||||
var file = data.files[0];
|
||||
// console.log(file);
|
||||
var response = data.response.initialPreviewConfig.extra;
|
||||
// console.log(response);
|
||||
.on("filebatchselected", function(event, files) {
|
||||
$(selector).fileinput("upload");
|
||||
}).on('fileuploaded', function(event, data, previewId, index, fileId) {
|
||||
// console.log('File uploaded', previewId, index, fileId);
|
||||
var file = data.files[0];
|
||||
// console.log(file);
|
||||
var response = data.response.initialPreviewConfig.extra;
|
||||
// console.log(response);
|
||||
|
||||
response.model = $(this).data('model');
|
||||
response.model = $(this).data('model');
|
||||
|
||||
// console.log(response);
|
||||
if (typeof(callbackUploaded) !== 'undefined') {
|
||||
// console.log('Callback');
|
||||
eval(callbackUploaded);
|
||||
}
|
||||
}).on('filebatchuploadcomplete', function(event, preview, config, tags, extraData) {
|
||||
console.log('File Batch Uploaded', preview, config, tags, extraData);
|
||||
}).on('filebatchuploadsuccess', function(event, data) {
|
||||
console.log('File batch upload success');
|
||||
console.log(data);
|
||||
}).on('fileuploaderror', function(event, data, msg) {
|
||||
console.log('File upload error');
|
||||
console.log(data);
|
||||
console.log(msg);
|
||||
});
|
||||
// console.log(response);
|
||||
if (typeof(callbackUploaded) !== 'undefined') {
|
||||
// console.log('Callback');
|
||||
eval(callbackUploaded);
|
||||
}
|
||||
}).on('filebatchuploadcomplete', function(event, preview, config, tags, extraData) {
|
||||
console.log('File Batch Uploaded', preview, config, tags, extraData);
|
||||
}).on('filebatchuploadsuccess', function(event, data) {
|
||||
console.log('File batch upload success');
|
||||
console.log(data);
|
||||
}).on('fileuploaderror', function(event, data, msg) {
|
||||
console.log('File upload error');
|
||||
console.log(data);
|
||||
console.log(msg);
|
||||
});
|
||||
}
|
||||
|
||||
function UploadOptions(options) {
|
||||
return {
|
||||
allowedFileExtensions: (typeof(options.allowedFileExtensions) == 'undefined') ? ['doc','docx','jpg','jpeg','png','xls','xlsx','pdf'] : options.allowedFileExtensions,
|
||||
allowedFileExtensions: (typeof(options.allowedFileExtensions) == 'undefined') ? ['doc', 'docx', 'jpg',
|
||||
'jpeg', 'png', 'xls', 'xlsx', 'pdf'
|
||||
] : options.allowedFileExtensions,
|
||||
browseOnZoneClick: (typeof(options.browseOnZoneClick) == 'undefined') ? true : options.browseOnZoneClick,
|
||||
dropZoneEnabled: (typeof(options.dropZoneEnabled) == 'undefined') ? false : options.dropZoneEnabled,
|
||||
initialPreview: (typeof(options.initialPreview) == 'undefined') ? false : options.initialPreview,
|
||||
initialPreviewAsData: (typeof(options.initialPreviewAsData) == 'undefined') ? false : options.initialPreviewAsData,
|
||||
initialPreviewAsData: (typeof(options.initialPreviewAsData) == 'undefined') ? false : options
|
||||
.initialPreviewAsData,
|
||||
maxFilesize: (typeof(options.maxFilesize) == 'undefined') ? false : options.maxFilesize,
|
||||
overwriteInitial: (typeof(options.overwriteInitial) == 'undefined') ? false : options.overwriteInitial,
|
||||
showCaption: (typeof(options.showCaption) == 'undefined') ? true : options.showCaption,
|
||||
@@ -117,8 +119,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
function initFileInputImage(images, sel)
|
||||
{
|
||||
function initFileInputImage(images, sel) {
|
||||
UploadInit(sel, {
|
||||
allowedFileExtensions: ['jpg', 'jpeg', 'png', 'gif'],
|
||||
overwriteInitial: true,
|
||||
@@ -131,8 +132,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
function uploadShowImage(id, image)
|
||||
{
|
||||
function uploadShowImage(id, image) {
|
||||
$('#' + id + '_preview').toggleClass('d-none');
|
||||
$('#' + id + '_preview').find('img').attr('src', image);
|
||||
$('#' + id + '_uploader').toggleClass('d-none');
|
||||
|
||||
Reference in New Issue
Block a user