CEditTitle.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /****************************************************************
  2. ** Licensed Materials - Property of IBM
  3. **
  4. ** BI and PM: qs
  5. **
  6. ** (C) Copyright IBM Corp. 2001, 2015
  7. **
  8. ** US Government Users Restricted Rights - Use, duplication or
  9. ** disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  10. *****************************************************************/
  11. // Copyright (C) 2008 Cognos ULC, an IBM Company. All Rights Reserved.
  12. // Cognos and the Cognos logo are trademarks of Cognos ULC (formerly Cognos Incorporated) in the United States and/or other countries. IBM and the IBM logo are trademarks of International Business Machines Corporation in the United States, or other countries, or both. Other company, product, or service names may be trademarks or service marks of others.
  13. function CEditTitle()
  14. {
  15. };
  16. CEditTitle.prototype = new AFeatureObject();
  17. CEditTitle.prototype.setup = function (aFeatureParams)
  18. {
  19. this.m_aParams = new Array();
  20. this.m_bRequiresDialog = true;
  21. cfgSet("LAST_DIALOG", "title");
  22. this.m_aParams["m"] = "/" + qs_dir + "/editTitle.xts";
  23. };
  24. CEditTitle.prototype.execute = function (aParameters)
  25. {
  26. try
  27. {
  28. var sCommand = "";
  29. var oDlgFrame = goApplicationManager.getDialogFrame();
  30. if (typeof oDlgFrame == "object")
  31. {
  32. var sTitle = oDlgFrame.document.f.title_text.value;
  33. if (sTitle === "")
  34. {
  35. sCommand += createCommand("O", "T", new Array("title", "false")) + ";";
  36. }
  37. else
  38. {
  39. sCommand += createCommand("O", "T", new Array("title", "true", escapeParam(sTitle))) + ";";
  40. }
  41. var sSubTitle = oDlgFrame.document.f.subtitle_text.value;
  42. if (sSubTitle)
  43. {
  44. sCommand += createCommand("O", "T", new Array("subtitle", "true", escapeParam(sSubTitle))) + ";";
  45. }
  46. else
  47. {
  48. sCommand += createCommand("O", "T", new Array("subtitle", "false")) + ";";
  49. }
  50. if (oDlgFrame.document.f.show_filters.checked)
  51. {
  52. sCommand += createCommand("O", "T", new Array("filter", "true")) + ";";
  53. }
  54. else
  55. {
  56. sCommand += createCommand("O", "T", new Array("filter", "false")) + ";";
  57. }
  58. if (oDlgFrame.document.f.show_sorts.checked)
  59. {
  60. sCommand += createCommand("O", "T", new Array("sort", "true")) + ";";
  61. }
  62. else
  63. {
  64. sCommand += createCommand("O", "T", new Array("sort", "false")) + ";";
  65. }
  66. if (oDlgFrame.document.f.show_suppress.checked)
  67. {
  68. sCommand += createCommand("O", "T", new Array("suppress", "true"));
  69. }
  70. else
  71. {
  72. sCommand += createCommand("O", "T", new Array("suppress", "false"));
  73. }
  74. addColumnsForReselection();
  75. sendCmd(sCommand, "", true);
  76. }
  77. goApplicationManager.getWindowManager().hideDialogFrame();
  78. }
  79. catch (e)
  80. {
  81. }
  82. };