Skip to content

Commit

Permalink
Merge pull request #41 from threadi/feature/prepareRelease
Browse files Browse the repository at this point in the history
Feature/prepare release
  • Loading branch information
threadi authored Nov 10, 2024
2 parents 7ea435f + 128a8e0 commit 6e28feb
Show file tree
Hide file tree
Showing 116 changed files with 21,717 additions and 4,960 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ languages/*.json
/vendor/
/svn/
/build/build.properties
/todo.txt
41 changes: 41 additions & 0 deletions admin/import.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* Import given settings file via AJAX.
*/
function efml_import_settings_file() {
let file = jQuery('#import_settings_file')[0].files[0];
if( undefined === file ) {
let dialog_config = {
detail: {
title: efmlImportJsVars.title_settings_import_file_missing,
texts: [
'<p>' + efmlImportJsVars.text_settings_import_file_missing + '</p>'
],
buttons: [
{
'action': 'closeDialog();',
'variant': 'primary',
'text': efmlImportJsVars.lbl_ok
}
]
}
}
efml_create_dialog( dialog_config );
return;
}

let request = new FormData();
request.append( 'file', file);
request.append( 'action', 'eml_settings_import_file' );
request.append( 'nonce', efmlImportJsVars.settings_import_file_nonce );

jQuery.ajax({
url: efmlImportJsVars.ajax_url,
type: "POST",
data: request,
contentType: false,
processData: false,
success: function( dialog_config ){
efml_create_dialog( dialog_config );
},
});
}
Loading

0 comments on commit 6e28feb

Please sign in to comment.