export.html.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php include '../../../common/view/header.modal.html.php';?>
  2. <div id="mainContent" class='load-indicator'>
  3. <div class='main-header'>
  4. <h2><?php echo $lang->export;?></h2>
  5. </div>
  6. <form class="main-form" target='hiddenwin' method='post'>
  7. <table class='table table-form'>
  8. <tr>
  9. <th class='w-100px'><?php echo $lang->setFileName;?></th>
  10. <td><?php echo html::input('fileName', $fileName, "class='form-control'")?></td>
  11. </tr>
  12. <tr>
  13. <th><?php echo $lang->doc->export->range; ?></th>
  14. <td><?php echo html::select('range', $chapters, 0, "class='form-control chosen'")?></td>
  15. </tr>
  16. <tr>
  17. <th><?php echo $lang->doc->export->fileType?></th>
  18. <td><?php echo html::select('fileType', array('word'), 0, "class='form-control' disabled")?></td>
  19. </tr>
  20. <tr>
  21. <th><?php echo $lang->doc->export->encode?></th>
  22. <td><?php echo html::select('encode', array('UTF-8'), 0, "class='form-control' disabled")?></td>
  23. </tr>
  24. <tr>
  25. <th><?php echo $lang->doc->export->format?></th>
  26. <td><?php echo html::hidden('format', 'doc') . $lang->doc->export->formatList['doc'];?></td>
  27. </tr>
  28. <tr>
  29. <td colspan='2' class='text-center'><?php echo html::submitButton($lang->export, "onclick='setDownloading();'");?></td>
  30. </tr>
  31. </table>
  32. </form>
  33. </div>
  34. <script>
  35. function setDownloading()
  36. {
  37. if(navigator.userAgent.toLowerCase().indexOf("opera") > -1) return true; // Opera don't support, omit it.
  38. var $fileName = $('#fileName');
  39. if($fileName.val() === '') $fileName.val('<?php echo $lang->file->untitled;?>');
  40. $.cookie('downloading', 0);
  41. time = setInterval("closeWindow()", 300);
  42. $('#mainContent').addClass('loading');
  43. return true;
  44. }
  45. function closeWindow()
  46. {
  47. if($.cookie('downloading') == 1)
  48. {
  49. $('#mainContent').removeClass('loading');
  50. $.closeModal();
  51. $.cookie('downloading', null);
  52. clearInterval(time);
  53. }
  54. }
  55. </script>
  56. <iframe name='hiddenwin' class='hidden'></iframe>
  57. <?php include '../../../common/view/footer.modal.html.php';?>