init.js 1012 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. function starredImportComplete(iframe) {
  2. try {
  3. if (!iframe.contentDocument.body.innerHTML) return false;
  4. Element.show(iframe);
  5. notify('');
  6. if (dijit.byId('starredImportDlg'))
  7. dijit.byId('starredImportDlg').destroyRecursive();
  8. var content = iframe.contentDocument.body.innerHTML;
  9. if (content) Element.hide(iframe);
  10. dialog = new dijit.Dialog({
  11. id: "starredImportDlg",
  12. title: __("Google Reader Import"),
  13. style: "width: 600px",
  14. onCancel: function() {
  15. Element.hide(iframe);
  16. this.hide();
  17. },
  18. execute: function() {
  19. Element.hide(iframe);
  20. this.hide();
  21. },
  22. content: content});
  23. dialog.show();
  24. } catch (e) {
  25. exception_error("starredImportComplete", e);
  26. }
  27. }
  28. function starredImport() {
  29. var starred_file = $("starred_file");
  30. if (starred_file.value.length == 0) {
  31. alert(__("Please choose a file first."));
  32. return false;
  33. } else {
  34. notify_progress("Importing, please wait...", true);
  35. Element.show("starred_upload_iframe");
  36. return true;
  37. }
  38. }