export.html.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /**
  3. * The export view file of testreport module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Yidong Wang <yidong@cnezsoft.com>
  8. * @package testreport
  9. * @version $Id$
  10. * @link http://www.zentao.net
  11. */
  12. ?>
  13. <?php include $app->getModuleRoot() . 'common/view/header.lite.html.php';?>
  14. <?php
  15. unset($lang->exportFileTypeList);
  16. if(is_dir($this->app->getCoreLibRoot() . 'word')) $lang->exportFileTypeList['word'] = 'word';
  17. $lang->exportFileTypeList['html'] = 'html';
  18. ?>
  19. <style>
  20. body{padding-bottom:0px;}
  21. </style>
  22. <script>
  23. function setDownloading()
  24. {
  25. if(navigator.userAgent.toLowerCase().indexOf("opera") > -1) return true; // Opera don't support, omit it.
  26. $.cookie('downloading', 0);
  27. time = setInterval("closeWindow()", 300);
  28. return true;
  29. }
  30. function closeWindow()
  31. {
  32. if($.cookie('downloading') == 1)
  33. {
  34. parent.$.closeModal();
  35. $.cookie('downloading', null);
  36. clearInterval(time);
  37. }
  38. }
  39. $(function()
  40. {
  41. parent.$('.chart-canvas canvas').each(function()
  42. {
  43. chartImgData = $(this).get(0).toDataURL("image/png");
  44. chartID = $(this).attr('id');
  45. $('#submit').after("<input type='hidden' name='" + chartID +"' id='" + chartID + "' />");
  46. $('#' + chartID).val(chartImgData);
  47. });
  48. })
  49. </script>
  50. <div id='mainContent' class='main-content'>
  51. <div class='main-header'>
  52. <h2><?php echo $lang->export;?></h2>
  53. </div>
  54. <form class='main-form' method='post' target='hiddenwin' style='padding: 30px 1%'>
  55. <table class='w-p100 table-fixed'>
  56. <tr>
  57. <td>
  58. <div class='input-group'>
  59. <span class='input-group-addon'><?php echo $lang->setFileName;?></span>
  60. <?php echo html::input('fileName', '', "class='form-control' autocomplete='off'");?>
  61. </div>
  62. </td>
  63. <td class='w-80px'>
  64. <?php echo html::select('fileType', $lang->exportFileTypeList, '', 'class="form-control"');?>
  65. </td>
  66. <td style='width:70px'>
  67. <?php echo html::submitButton($lang->export, "onclick='setDownloading();'", 'btn btn-primary');?>
  68. </td>
  69. </tr>
  70. </table>
  71. </form>
  72. </div>
  73. <?php include $app->getModuleRoot() . 'common/view/footer.lite.html.php';?>