API Docs for: 1.0.0
Show:

File: Resources/public/js/views/ez-studiopluspresentationview.js

  1. /*
  2. * Copyright (C) eZ Systems AS. All rights reserved.
  3. * For full copyright and license information view LICENSE file distributed with this source code.
  4. */
  5. YUI.add('ez-studiopluspresentationview', function (Y) {
  6. "use strict";
  7. /**
  8. * Provides the Studio Plus Presentation View class
  9. *
  10. * @module ez-studiopluspresentationview
  11. */
  12. Y.namespace('eZ');
  13.  
  14. /**
  15. * The studio plus presentation view
  16. *
  17. * @namespace eZ
  18. * @class StudioPlusPresentationView
  19. * @constructor
  20. * @extends eZ.TemplateBasedView
  21. */
  22. Y.eZ.StudioPlusPresentationView = Y.Base.create('studioPlusPresentationView', Y.eZ.TemplateBasedView, [Y.eZ.HeightFit], {
  23. initializer: function () {
  24. this.after('activeChange', this._setIFrameSource);
  25. },
  26.  
  27. /**
  28. * Renders the studio plus presentation view
  29. *
  30. * @method render
  31. * @return {eZ.StudioPlusPresentationView} the view itself
  32. */
  33. render: function () {
  34. this.get('container').setHTML(this.template());
  35. this._attachedViewEvents.push(Y.on("windowresize", Y.bind(this._uiSetHeight, this, 0)));
  36.  
  37. return this;
  38. },
  39.  
  40. /**
  41. * Sets the source of the iframe to the value of the iframeSource attribute.
  42. *
  43. * @method _setIFrameSource
  44. * @private
  45. */
  46. _setIFrameSource: function () {
  47. this.get('container').one('.ez-studiopluspresentation-content').set('src', this.get('iframeSource'));
  48. }
  49.  
  50. }, {
  51. ATTRS: {
  52. /**
  53. * Stores the iframe Source
  54. *
  55. * @attribute iframeSource
  56. * @type String
  57. * @default 'http://ez.no/in-product-studioplus-teaser'
  58. * @readOnly
  59. */
  60. iframeSource: {
  61. value: '//ez.no/in-product-studioplus-teaser',
  62. readOnly: true,
  63. },
  64. },
  65. });
  66. });
  67.