diff options
author | Andrew Dolgov <[email protected]> | 2013-03-28 16:26:46 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-03-28 16:26:46 +0400 |
commit | 493c2f889e0e0d5683fe9dcc614f1d9ea9bcdcba (patch) | |
tree | 8183ec8b165bcb7b1846384eb1bc81b803a780e6 /plugins/greaderstarredimport/init.js | |
parent | b3575bd8e46b85c56f684cdc905ae31aba4c983f (diff) |
add basic plugin to import google reader starred.json
Diffstat (limited to 'plugins/greaderstarredimport/init.js')
-rw-r--r-- | plugins/greaderstarredimport/init.js | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/plugins/greaderstarredimport/init.js b/plugins/greaderstarredimport/init.js new file mode 100644 index 000000000..e7057d82a --- /dev/null +++ b/plugins/greaderstarredimport/init.js @@ -0,0 +1,53 @@ +function starredImportComplete(iframe) { + try { + if (!iframe.contentDocument.body.innerHTML) return false; + + Element.show(iframe); + + notify(''); + + if (dijit.byId('starredImportDlg')) + dijit.byId('starredImportDlg').destroyRecursive(); + + var content = iframe.contentDocument.body.innerHTML; + + if (content) Element.hide(iframe); + + dialog = new dijit.Dialog({ + id: "starredImportDlg", + title: __("OPML Import"), + style: "width: 600px", + onCancel: function() { + Element.hide(iframe); + this.hide(); + }, + execute: function() { + Element.hide(iframe); + this.hide(); + }, + content: content}); + + dialog.show(); + + } catch (e) { + exception_error("starredImportComplete", e); + } +} + +function starredImport() { + + var starred_file = $("starred_file"); + + if (starred_file.value.length == 0) { + alert(__("Please choose a file first.")); + return false; + } else { + notify_progress("Importing, please wait...", true); + + Element.show("starred_upload_iframe"); + + return true; + } +} + + |