zentaomax.js 862 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /**
  2. * Set story design.
  3. *
  4. * @access public
  5. * @return void
  6. */
  7. function setStoryDesign(designID)
  8. {
  9. var storyID = $('#story').val() ? $('#story').val() : 0;
  10. var executionID = $('#execution').val();
  11. designID = typeof(designID) == 'undefined' ? 0 : designID;
  12. var link = createLink('story', 'ajaxGetDesign', 'storyID=' + storyID + '&designID=' + designID + '&executionID=' + executionID);
  13. $.post(link, function(data)
  14. {
  15. $('#design').replaceWith(data);
  16. $('#design_chosen').remove();
  17. $('#design').chosen();
  18. });
  19. }
  20. /**
  21. * Set story related.
  22. *
  23. * @param int $num
  24. * @access public
  25. * @return void
  26. */
  27. function setStoryRelated(num)
  28. {
  29. if(typeof num === 'undefined')
  30. {
  31. setPreview();
  32. setStoryModule();
  33. setStoryDesign();
  34. }
  35. else
  36. {
  37. setPreview(num);
  38. }
  39. }