automation.ui.js 627 B

12345678910111213141516171819202122
  1. function loadProduct()
  2. {
  3. $('#shell').val('');
  4. $('#scriptPath').val('');
  5. var productID = $('[name=product]').val();
  6. var url = $.createLink('zanode', 'ajaxGetZTFScript', "type=product&objectID=" + productID)
  7. $.get(url, function(result)
  8. {
  9. if(result.result == 'success')
  10. {
  11. data = result.data;
  12. if(!data) return false;
  13. $('#node').picker('setValue', data.node);
  14. $('#shell').val(data.shell);
  15. $('#scriptPath').val(data.scriptPath);
  16. if($('[name=id]').length) $('[name=id]').val(data.id);
  17. }
  18. }, 'json');
  19. }