mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 15:25:59 +00:00
implement experimental personal data import
This commit is contained in:
52
js/prefs.js
52
js/prefs.js
@@ -754,6 +754,8 @@ function opmlImportComplete(iframe) {
|
||||
try {
|
||||
if (!iframe.contentDocument.body.innerHTML) return false;
|
||||
|
||||
Element.show(iframe);
|
||||
|
||||
notify('');
|
||||
|
||||
if (dijit.byId('opmlImportDlg'))
|
||||
@@ -794,10 +796,30 @@ function opmlImport() {
|
||||
return false;
|
||||
} else {
|
||||
notify_progress("Importing, please wait...", true);
|
||||
|
||||
Element.show("upload_iframe");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function importData() {
|
||||
|
||||
var file = $("export_file");
|
||||
|
||||
if (file.value.length == 0) {
|
||||
alert(__("Please choose the file first."));
|
||||
return false;
|
||||
} else {
|
||||
notify_progress("Importing, please wait...", true);
|
||||
|
||||
Element.show("data_upload_iframe");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function updateFilterList() {
|
||||
new Ajax.Request("backend.php", {
|
||||
parameters: "?op=pref-filters",
|
||||
@@ -2013,3 +2035,33 @@ function exportData() {
|
||||
}
|
||||
}
|
||||
|
||||
function dataImportComplete(iframe) {
|
||||
try {
|
||||
if (!iframe.contentDocument.body.innerHTML) return false;
|
||||
|
||||
Element.hide(iframe);
|
||||
|
||||
notify('');
|
||||
|
||||
if (dijit.byId('dataImportDlg'))
|
||||
dijit.byId('dataImportDlg').destroyRecursive();
|
||||
|
||||
var content = iframe.contentDocument.body.innerHTML;
|
||||
|
||||
dialog = new dijit.Dialog({
|
||||
id: "dataImportDlg",
|
||||
title: __("Data Import"),
|
||||
style: "width: 600px",
|
||||
onCancel: function() {
|
||||
|
||||
},
|
||||
content: content});
|
||||
|
||||
dialog.show();
|
||||
|
||||
} catch (e) {
|
||||
exception_error("dataImportComplete", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user