header.html.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  2. <?php
  3. $requiredFields = $datas->requiredFields;
  4. $allCount = $datas->allCount;
  5. $allPager = $datas->allPager;
  6. $pagerID = $datas->pagerID;
  7. $isEndPage = $datas->isEndPage;
  8. $maxImport = $datas->maxImport;
  9. $dataInsert = $datas->dataInsert;
  10. $fields = $datas->fields;
  11. $suhosinInfo = $datas->suhosinInfo;
  12. $model = $datas->model;
  13. $datas = $datas->datas;
  14. $appendFields = $this->session->appendFields;
  15. $notEmptyRule = $this->session->notEmptyRule;
  16. ?>
  17. <style>
  18. form{overflow-x: scroll}
  19. #maxImport:focus {outline: none;}
  20. .pointorNone{pointer-events:none;}
  21. thead > tr > th{width:150px;}
  22. .c-pri{width:80px}
  23. .c-name, .c-story,.c-precondition{width:200px;}
  24. .c-id{width:50px}
  25. .c-team {width:100px; padding:0px 0px 8px 0px !important;}
  26. .c-estimate-1 {width:50px;padding:0px 0px 8px 8px !important;}
  27. #showData .load-indicator{width: 100px; height: 500px;}
  28. .picker-selection-text{white-space: nowrap; overflow: hidden; display: block;}
  29. </style>
  30. <?php if(!empty($suhosinInfo)):?>
  31. <div class='alert alert-info'><?php echo $suhosinInfo?></div>
  32. <?php die;?>
  33. <?php elseif(empty($maxImport) and $allCount > $this->config->file->maxImport):?>
  34. <div id="mainContent" class="main-content">
  35. <div class="main-header">
  36. <h2><?php echo $lang->transfer->import;?></h2>
  37. </div>
  38. <p><?php echo sprintf($lang->file->importSummary, $allCount, html::input('maxImport', $config->file->maxImport, "style='width:50px'"), ceil($allCount / $config->file->maxImport));?></p>
  39. <p><?php echo html::commonButton($lang->import, "id='import'", 'btn btn-primary');?></p>
  40. </div>
  41. <script>
  42. $(function()
  43. {
  44. $('#maxImport').keyup(function()
  45. {
  46. if(parseInt($('#maxImport').val())) $('#times').html(Math.ceil(parseInt($('#allCount').html()) / parseInt($('#maxImport').val())));
  47. });
  48. $('#import').click(function()
  49. {
  50. $.cookie('maxImport', $('#maxImport').val());
  51. location.href = "<?php echo $this->app->getURI()?>";
  52. })
  53. });
  54. </script>
  55. <?php die;endif;?>
  56. <?php js::set('requiredFields', $requiredFields);?>
  57. <?php js::set('allCount', $allCount);?>