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. //GULP_ABSTRACT_END
  8. define(['jquery', 'BlockJsonBase', 'validator'], function ($, BlockJsonBase, validator) {
  9. TSLiteModules.BlockJsonBase = BlockJsonBase;
  10. /**
  11. BlockDigg is based on JSON base class component
  12. @class BlockDigg
  13. @constructor
  14. @return {Object} instantiated BlockDigg
  15. **/
  16. var BlockDigg = (function (_super) {
  17. __extends(BlockDigg, _super);
  18. function BlockDigg(options) {
  19. this.m_options = options;
  20. this.m_blockType = 6000;
  21. _.extend(this.m_options, { blockType: this.m_blockType });
  22. _super.call(this);
  23. }
  24. /**
  25. Init sub class and super on base
  26. @method initialize
  27. **/
  28. BlockDigg.prototype.initialize = function () {
  29. var self = this;
  30. _super.prototype.initialize.call(this, this.m_options);
  31. self.m_mimeType = 'Json.digg';
  32. self._initSettingsPanel();
  33. };
  34. /**
  35. Init the settings panel that's used by Block common props for JSON based components
  36. @method _initSettingsPanel
  37. **/
  38. BlockDigg.prototype._initSettingsPanel = function () {
  39. var self = this;
  40. self.m_blockProperty.initSettingsPanel(Elements.BLOCK_COMMON_SETTINGS_DIGG);
  41. };
  42. /**
  43. Load block specific properties
  44. @override
  45. @method _loadBlockSpecificProps
  46. **/
  47. BlockDigg.prototype._loadBlockSpecificProps = function () {
  48. var self = this;
  49. self.m_blockProperty.viewSettingsPanel(Elements.BLOCK_COMMON_SETTINGS_DIGG);
  50. _super.prototype._loadBlockSpecificProps.call(this);
  51. };
  52. /**
  53. Hide the Settings tab as Digg does not have any special component setting options
  54. @override
  55. @method _updateTitleTab
  56. */
  57. BlockDigg.prototype._updateTitleTab = function () {
  58. var self = this;
  59. $(Elements.BLOCK_COMMON_SETTINGS_TAB).hide();
  60. };
  61. /**
  62. Delete this block
  63. @method deleteBlock
  64. @params {Boolean} i_memoryOnly if true only remove from existance but not from msdb
  65. **/
  66. BlockDigg.prototype.deleteBlock = function (i_memoryOnly) {
  67. var self = this;
  68. _super.prototype.deleteBlock.call(this, i_memoryOnly);
  69. };
  70. return BlockDigg;
  71. })(TSLiteModules.BlockJsonBase);
  72. return BlockDigg;
  73. });
  74. //# sourceMappingURL=BlockDigg.js.map