-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from threadi/feature/prepareRelease
Feature/prepare release
- Loading branch information
Showing
116 changed files
with
21,717 additions
and
4,960 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ languages/*.json | |
/vendor/ | ||
/svn/ | ||
/build/build.properties | ||
/todo.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ); | ||
}, | ||
}); | ||
} |
Oops, something went wrong.