batchcreate.ipd.html.hook.php 1.9 KB

12345678910111213141516171819202122
  1. <?php
  2. $htmlTh = "<th class='c-duration " . zget($visibleFields, 'duration', ' hidden') . zget($requiredFields, 'duration', '', ' required') . " durationBox'>{$lang->story->duration}</th>";
  3. $htmlTh .= "<th class='c-BSA " . zget($visibleFields, 'BSA', ' hidden') . zget($requiredFields, 'BSA', '', ' required') . " BSABox'>{$lang->story->BSA} ";
  4. $htmlTh .= "<icon class='icon icon-help' data-toggle='popover' data-trigger='focus hover' data-placement='right' data-tip-class='text-muted popover-sm' data-content='{$lang->demand->bsaTip}'></icon>";
  5. $htmlTh .= "</th>";
  6. $htmlTd = "<td class='text-left" . zget($visibleFields, 'duration', ' hidden') . " durationBox' style='overflow:visible'>" . html::select('duration[$id]', $lang->demand->durationList, '', "class='form-control chosen'") . "</td>";
  7. $htmlTd .= "<td class='text-left" . zget($visibleFields, 'BSA', ' hidden') . " BSABox' style='overflow:visible'>" . html::select('BSA[$id]', $lang->demand->bsaList, '', "class='form-control chosen'") . "</td>";
  8. $templateTd = "<td class='text-left" . zget($visibleFields, 'duration', ' hidden') . " durationBox' style='overflow:visible'>" . html::select('duration[%i%]', $lang->demand->durationList, '', "class='form-control chosen'") . "</td>";
  9. $templateTd .= "<td class='text-left" . zget($visibleFields, 'BSA', ' hidden') . " BSABox' style='overflow:visible'>" . html::select('BSA[%i%]', $lang->demand->bsaList, '', "class='form-control chosen'") . "</td>";
  10. $this->session->set('storyList', $this->createLink('product', 'browse', "productID=$product->id&branch=$branch&browseType=allstory"), 'product');
  11. ?>
  12. <script>
  13. $('.c-category').after(<?php echo json_encode($htmlTh);?>);
  14. $('.categoryBox').after(<?php echo json_encode($htmlTd);?>);
  15. $('#addRow select[name*="category"]').after(<?php echo json_encode($templateTd);?>);
  16. /* Spec always show. */
  17. if($('.specBox').hasClass('hidden')) $('.specBox').removeClass('hidden')
  18. $('[data-toggle="popover"]').popover();
  19. </script>