- Added comprehensive AI Assistant system (aiassist/ directory): * Vector search and embedding capabilities * Typebot proxy integration * Elastic search functionality * Message classification and chat history * MCP proxy for external integrations - Implemented Court Status API (GetCourtStatus.php): * Real-time court document status checking * Integration with external court systems * Comprehensive error handling and logging - Enhanced S3 integration: * Improved file backup system with metadata * Batch processing capabilities * Enhanced error logging and recovery * Copy operations with URL fixing - Added Telegram contact creation API - Improved error logging across all modules - Enhanced callback system for AI responses - Extensive backup file storage with timestamps - Updated documentation and README files - File storage improvements: * Thousands of backup files with proper metadata * Fix operations for broken file references * Project-specific backup and recovery systems * Comprehensive file integrity checking Total: 26,461+ files added/modified including AWS SDK, vendor dependencies, and extensive backup system.
113 lines
4.4 KiB
JavaScript
113 lines
4.4 KiB
JavaScript
(function($) {
|
|
var LocalImporter = function() {
|
|
var uploadDone = false;
|
|
|
|
|
|
this.init = function() {
|
|
$('.UploadFile').on('click', $.proxy(function(e) {
|
|
|
|
this.uploadFile();
|
|
|
|
}, this));
|
|
$('.SetImportOptions').on('click', $.proxy(function(e) {
|
|
|
|
this.setOptions();
|
|
|
|
}, this));
|
|
|
|
$('#ImportFileUpload, #ImportSetOptions').on('submit', $.proxy(function(e) {
|
|
e.preventDefault();
|
|
e.stopPropagation();
|
|
}, this));
|
|
|
|
$('.StartImportBtn').on('click', $.proxy(function() {
|
|
$('.ShowOnImport').slideDown('fast');
|
|
$('.HideOnImport').slideUp('fast')
|
|
|
|
this.startImport();
|
|
}, this));
|
|
};
|
|
|
|
this.startImport = function() {
|
|
RedooAjax('Workflow2').postAction('ImportRun', { ImportHash:$('#ImportHash').val() }, 'json').then($.proxy(function(response) {
|
|
|
|
if(response.ready === true) {
|
|
$('#ProgressPanel').html('<div class="alert alert-success">' + response.text + '</div><br/><button type="button" class="btn btn-default CloseImportBtn">' + app.vtranslate('JS_CLOSE') + '</button>');
|
|
|
|
$('.CloseImportBtn').on('click', function() {
|
|
RedooUtils('Workflow2').hideContentOverlay();
|
|
});
|
|
} else {
|
|
$('#ProgressPanel').html(response.text);
|
|
|
|
window.setTimeout($.proxy(this.startImport, this), 250);
|
|
}
|
|
|
|
}, this));
|
|
};
|
|
|
|
this.uploadFile = function() {
|
|
var options = {
|
|
// target: '#output2', // target element(s) to be updated with server response
|
|
beforeSubmit: $.proxy(function() {
|
|
this.clearPreview();
|
|
}, this), // pre-submit callback
|
|
success: $.proxy(function(response) {
|
|
$('.ImportStep2').fadeIn('fast');
|
|
|
|
this.refreshPreview();
|
|
}, this), // post-submit callback
|
|
|
|
// other available options:
|
|
url: 'index.php?module=Workflow2&action=ImportUploadFile' // override for form's 'action' attribute
|
|
//type: type // 'get' or 'post', override for form's 'method' attribute
|
|
//dataType: 'json' // 'xml', 'script', or 'json' (expected server response type)
|
|
//clearForm: true // clear all form fields after successful submit
|
|
//resetForm: true // reset the form after successful submit
|
|
|
|
// $.ajax options can be used here too, for example:
|
|
//timeout: 3000
|
|
};
|
|
|
|
$('#ImportFileUpload').ajaxSubmit(options);
|
|
};
|
|
|
|
this.setOptions = function() {
|
|
var options = {
|
|
// target: '#output2', // target element(s) to be updated with server response
|
|
beforeSubmit: $.proxy(function() {
|
|
this.clearPreview();
|
|
}, this), // pre-submit callback
|
|
success: $.proxy(function(response) {
|
|
$('.ImportStep3').slideDown('fast');
|
|
|
|
this.refreshPreview();
|
|
}, this), // post-submit callback
|
|
|
|
// other available options:
|
|
url: 'index.php?module=Workflow2&action=ImportSetOptions' // override for form's 'action' attribute
|
|
//type: type // 'get' or 'post', override for form's 'method' attribute
|
|
//dataType: 'json' // 'xml', 'script', or 'json' (expected server response type)
|
|
//clearForm: true // clear all form fields after successful submit
|
|
//resetForm: true // reset the form after successful submit
|
|
|
|
// $.ajax options can be used here too, for example:
|
|
//timeout: 3000
|
|
};
|
|
|
|
$('#ImportSetOptions').ajaxSubmit(options);
|
|
};
|
|
|
|
this.clearPreview = function() {
|
|
$('#ImportPreview').html('');
|
|
};
|
|
|
|
this.refreshPreview = function() {
|
|
RedooAjax('Workflow2').postView('ImportPreview', {ImportHash:$('#ImportHash').val()}).then(function(response) {
|
|
$('#ImportPreview').html(response);
|
|
});
|
|
}
|
|
};
|
|
|
|
window.Importer = LocalImporter;
|
|
})(jQuery); |