APIs

Show:
  1. ///<reference path="../../typings/lite/app_references.d.ts" />
  2. var __extends = (this && this.__extends) || function (d, b) {
  3. for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
  4. function __() { this.constructor = d; }
  5. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  6. };
  7. define(['jquery', 'BlockJsonBase'], function ($, BlockJsonBase) {
  8. TSLiteModules.BlockJsonBase = BlockJsonBase;
  9. /**
  10. BlockJson is a Player block that is used as base class for all JSON based components
  11. it allows for parsing of JSON data and is supported with the JSON Item inside scenes
  12.  
  13. The setup sequence is:
  14. ======================
  15. 1. Constructor of the child, which calls super on base
  16. 2. Constructor of the base, which calls init on base
  17. 3. Initialize of the base
  18. 4. Initialize of the child
  19. 5. Instance is ready
  20.  
  21. @class BlockJson
  22. @constructor
  23. @return {Object} instantiated BlockJson
  24. * @example
  25. * path: http://www.digitalsignage.com/videoTutorials/_data/videos.json
  26. * json player: children[0].children
  27. * json item: text
  28. **/
  29. var BlockJson = (function (_super) {
  30. __extends(BlockJson, _super);
  31. function BlockJson(options) {
  32. //BB.lib.log('c child');
  33. this.m_options = options;
  34. this.m_blockType = 4300;
  35. _.extend(this.m_options, { blockType: this.m_blockType });
  36. _super.call(this);
  37. }
  38. /**
  39. Init sub class and super on base
  40. @Override
  41. @method initialize
  42. **/
  43. BlockJson.prototype.initialize = function () {
  44. var self = this;
  45. _super.prototype.initialize.call(this, this.m_options);
  46. };
  47. /**
  48. Show the JSON URL and JSON Object paths inputs for the JSON component only
  49. @Override
  50. @method _showJsonPaths
  51. **/
  52. BlockJson.prototype._updateJsonPaths = function () {
  53. $(Elements.JSON_PATHS_CONTAINER).slideDown();
  54. };
  55. /**
  56. Update the title of the selected tab properties element and also show the sub tab
  57. for Settings of Json sub components (world weather, Calendar etc...)
  58. @override
  59. @method _updateTitleTab
  60. */
  61. BlockJson.prototype._updateTitleTab = function () {
  62. var self = this;
  63. _super.prototype._updateTitleTab.call(this);
  64. $(Elements.BLOCK_COMMON_SETTINGS_TAB).hide();
  65. };
  66. /**
  67. Populate the common properties UI
  68. @Override
  69. @method _populate
  70. **/
  71. BlockJson.prototype._populate = function () {
  72. _super.prototype._populate.call(this);
  73. $(Elements.JSON_PATHS_CONTAINER).show();
  74. };
  75. return BlockJson;
  76. })(TSLiteModules.BlockJsonBase);
  77. return BlockJson;
  78. });
  79. //# sourceMappingURL=BlockJson.js.map