You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

task_wait_count.tmpl 977 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
12345678910111213141516171819202122232425
  1. <div style="display:inline-block;">
  2. <div style="display:flex;align-items:center;color:#f2711c;">
  3. <i class="ri-error-warning-line" style="margin-right: 0.5rem; font-size: 14px"></i>
  4. <span style="font-size: 12px">{{.i18n.Tr "repo.wait_count_start"}} <span class="__task_wait_count__">{{if not .WaitCount}}1{{else}}{{addOne .WaitCount}}{{end}}</span> {{.i18n.Tr "repo.wait_count_end"}}</span>
  5. </div>
  6. </div>
  7. <script>
  8. ;(function() {
  9. var queuesDetail = {{.QueuesDetail}};
  10. if (queuesDetail) {
  11. function changeSpecs() {
  12. var specsSelEl = $('select#__specs__');
  13. var seldOption = specsSelEl.find('option:selected');
  14. var queueCode = seldOption.attr('queueCode');
  15. $('span.__task_wait_count__').text((queuesDetail[queueCode] || 0) +1);
  16. };
  17. $('body').on('change', 'select#__specs__', function(e) {
  18. changeSpecs();
  19. });
  20. setTimeout(function() {
  21. changeSpecs();
  22. }, 50);
  23. }
  24. })();
  25. </script>