OTRS API Reference JavaScript

Source: Core.Agent.Admin.SelectBox.js

  1. // --
  2. // Copyright (C) 2001-2018 OTRS AG, https://otrs.com/
  3. // --
  4. // This software comes with ABSOLUTELY NO WARRANTY. For details, see
  5. // the enclosed file COPYING for license information (GPL). If you
  6. // did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.
  7. // --
  8. "use strict";
  9. var Core = Core || {};
  10. Core.Agent = Core.Agent || {};
  11. Core.Agent.Admin = Core.Agent.Admin || {};
  12. /**
  13. * @namespace Core.Agent.Admin.SelectBox
  14. * @memberof Core.Agent.Admin
  15. * @author OTRS AG
  16. * @description
  17. * This namespace contains the special module function for AdminSelectBox.
  18. */
  19. Core.Agent.Admin.SelectBox = (function (TargetNS) {
  20. /*
  21. * @name Init
  22. * @memberof Core.Agent.Admin.SelectBox
  23. * @function
  24. * @description
  25. * This function initializes the module functionality.
  26. */
  27. TargetNS.Init = function () {
  28. Core.Form.Validate.SetSubmitFunction($('#AdminSelectBoxForm'), function (Form) {
  29. Form.submit();
  30. if ($('#ResultFormat option:selected').text() !== 'CSV'
  31. && $('#ResultFormat option:selected').text() !== 'Excel'
  32. ) {
  33. window.setTimeout(function(){
  34. Core.Form.DisableForm($(Form));
  35. }, 0);
  36. }
  37. });
  38. Core.UI.Table.InitTableFilter($('#FilterResults'), $('#Results'));
  39. };
  40. Core.Init.RegisterNamespace(TargetNS, 'APP_MODULE');
  41. return TargetNS;
  42. }(Core.Agent.Admin.SelectBox || {}));

^ Use Elevator