D_ppesAdminTitleDialog_async.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. // Licensed Materials - Property of IBM
  2. //
  3. // IBM Cognos Products: pps
  4. //
  5. // (C) Copyright IBM Corp. 2005, 2017
  6. //
  7. // US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  8. /**
  9. * @type Object
  10. */
  11. D_ppesAdminTitleDialog.F_GetTitle = function()
  12. {
  13. return this.m_sCurrentValue;
  14. };
  15. /**
  16. * @private
  17. */
  18. D_ppesAdminTitleDialog.F_Dialog_OnBeforeVisible = function()
  19. {
  20. /**
  21. * @private
  22. */
  23. this.m_cboTitleVars = new C_ComboBox( this.F_GetDlgItem( "cboppesAdminVars" ), null, G_ResManager.F_GetResource( 'ppesAdminTitleVarsListView' ), this );
  24. this.F_GetDlgItem( "ippesAdminTitleField" ).value = this.m_sCurrentValue;
  25. this.m_cboTitleVars.F_SelectByIndex(0); //Simply select the first one
  26. };
  27. /**
  28. * @private
  29. */
  30. D_ppesAdminTitleDialog.F_Dialog_OnAfterVisible = function()
  31. {
  32. //Set the focus to the title field
  33. this.F_GetDlgItem( "ippesAdminTitleField" ).focus();
  34. };
  35. /**
  36. * Clean up that is required before this instance is deleted
  37. * @type void
  38. */
  39. D_ppesAdminTitleDialog.F_Dialog_OnBeforeHide = function()
  40. {
  41. if ( this.m_cboTitleVars )
  42. {
  43. this.m_cboTitleVars.F_Detach();
  44. delete this.m_cboTitleVars;
  45. }
  46. };
  47. /**
  48. * @private
  49. */
  50. D_ppesAdminTitleDialog.F_OnInsert = function()
  51. {
  52. //Simply append the value of this selection to the title box
  53. this.F_GetDlgItem( "ippesAdminTitleField" ).value += this.m_cboTitleVars.F_GetValue();
  54. };
  55. /**
  56. * @private
  57. */
  58. D_ppesAdminTitleDialog.F_OnOk = function()
  59. {
  60. //simply overwrite the value of the title with the new one
  61. this.m_sCurrentValue = this.F_GetDlgItem( "ippesAdminTitleField" ).value;
  62. this.M_fnSuper_OnOK();
  63. };