GlassUtil.js 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. 'use strict';
  2. /*
  3. *+------------------------------------------------------------------------+
  4. *| Licensed Materials - Property of IBM
  5. *| IBM Cognos Products: dashboard
  6. *| (C) Copyright IBM Corp. 2016, 2017
  7. *|
  8. *| US Government Users Restricted Rights - Use, duplication or disclosure
  9. *| restricted by GSA ADP Schedule Contract with IBM Corp.
  10. *+------------------------------------------------------------------------+
  11. */
  12. define(['../../lib/@waca/core-client/js/core-client/ui/core/Class'], function (BaseClass) {
  13. var GlassUtil = BaseClass.extend({
  14. /** Returns true if we're in 'development' mode, false otherwise. */
  15. isDevMode: function isDevMode(services) {
  16. if (services && services.biGlass && services.biGlass.glassContext && services.biGlass.glassContext.isDevInstall) {
  17. return services.biGlass.glassContext.isDevInstall();
  18. }
  19. return false;
  20. },
  21. getAjaxService: function getAjaxService(glassContext) {
  22. return glassContext.services.ajax;
  23. }
  24. });
  25. return new GlassUtil();
  26. });
  27. //# sourceMappingURL=GlassUtil.js.map