[TASK] Migrate TYPO3/CMS/Viewpage/Main to TypeScript 91/59691/4
authorFrank Naegler <frank.naegler@typo3.org>
Wed, 13 Feb 2019 10:20:44 +0000 (11:20 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sun, 17 Feb 2019 09:33:59 +0000 (10:33 +0100)
Resolves: 87704
Releases: master
Change-Id: Ie502ba03c95e4efde77f07245f7cd260db48565a
Reviewed-on: https://review.typo3.org/c/59691
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/viewpage/Resources/Private/TypeScript/Main.ts [new file with mode: 0644]
typo3/sysext/viewpage/Resources/Public/JavaScript/Main.js

diff --git a/typo3/sysext/viewpage/Resources/Private/TypeScript/Main.ts b/typo3/sysext/viewpage/Resources/Private/TypeScript/Main.ts
new file mode 100644 (file)
index 0000000..a982ea5
--- /dev/null
@@ -0,0 +1,243 @@
+/*
+ * This file is part of the TYPO3 CMS project.
+ *
+ * It is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License, either version 2
+ * of the License, or any later version.
+ *
+ * For the full copyright and license information, please read the
+ * LICENSE.txt file that was distributed with this source code.
+ *
+ * The TYPO3 project - inspiring people to share!
+ */
+
+import * as $ from 'jquery';
+import 'jquery-ui/resizable';
+import PersistentStorage = require('TYPO3/CMS/Backend/Storage/Persistent');
+
+enum Selectors {
+  resizableContainerIdentifier = '.t3js-viewpage-resizeable',
+  sizeIdentifier = '.t3js-viewpage-size',
+  moduleBodySelector = '.t3js-module-body',
+  customSelector = '.t3js-preset-custom',
+  customWidthSelector = '.t3js-preset-custom',
+  customHeightSelector = '.t3js-preset-custom-height',
+  changeOrientationSelector = '.t3js-change-orientation',
+  changePresetSelector = '.t3js-change-preset',
+  inputWidthSelector = '.t3js-viewpage-input-width',
+  inputHeightSelector = '.t3js-viewpage-input-height',
+  currentLabelSelector = '.t3js-viewpage-current-label',
+  topbarContainerSelector = '.t3js-viewpage-topbar',
+}
+
+/**
+ * Module: TYPO3/CMS/Viewpage/Main
+ * Main logic for resizing the view of the frame
+ */
+class ViewPage {
+  private defaultLabel: string = '';
+  private readonly minimalHeight: number = 300;
+  private readonly minimalWidth: number = 300;
+
+  private readonly storagePrefix: string = 'moduleData.web_view.States.';
+  private $iframe: JQuery;
+  private $resizableContainer: JQuery;
+  private $sizeSelector: JQuery;
+
+
+  private readonly queue: Array<any> = [];
+  private queueIsRunning: boolean = false;
+  private queueDelayTimer: any;
+
+  private static getCurrentWidth(): string {
+    return $(Selectors.inputWidthSelector).val();
+  }
+
+  private static getCurrentHeight(): string {
+    return $(Selectors.inputHeightSelector).val();
+  }
+
+  private static setLabel(label: string): void {
+    $(Selectors.currentLabelSelector).html(label);
+  }
+
+  private static getCurrentLabel(): string {
+    return $(Selectors.currentLabelSelector).html().trim();
+  }
+
+  constructor() {
+    $((): void => {
+      const $presetCustomLabel = $('.t3js-preset-custom-label');
+
+      this.defaultLabel = $presetCustomLabel.length > 0 ? $presetCustomLabel.html().trim() : '';
+      this.$iframe = $('#tx_this_iframe');
+      this.$resizableContainer = $(Selectors.resizableContainerIdentifier);
+      this.$sizeSelector = $(Selectors.sizeIdentifier);
+
+      this.initialize();
+    });
+  }
+
+  private persistQueue(): void {
+    if (this.queueIsRunning === false && this.queue.length >= 1) {
+      this.queueIsRunning = true;
+      let item = this.queue.shift();
+      PersistentStorage.set(item.storageIdentifier, item.data).done((): void => {
+        this.queueIsRunning = false;
+        this.persistQueue();
+      });
+    }
+  }
+
+  private addToQueue(storageIdentifier: string, data: any): void {
+    const item = {
+      storageIdentifier: storageIdentifier,
+      data: data
+    };
+    this.queue.push(item);
+    if (this.queue.length >= 1) {
+      this.persistQueue();
+    }
+  }
+
+  private setSize(width: number, height: number): void {
+    if (isNaN(height)) {
+      height = this.calculateContainerMaxHeight();
+    }
+    if (height < this.minimalHeight) {
+      height = this.minimalHeight;
+    }
+    if (isNaN(width)) {
+      width = this.calculateContainerMaxWidth();
+    }
+    if (width < this.minimalWidth) {
+      width = this.minimalWidth;
+    }
+
+    $(Selectors.inputWidthSelector).val(width);
+    $(Selectors.inputHeightSelector).val(height);
+
+    this.$resizableContainer.css({
+      width: width,
+      height: height,
+      left: 0
+    });
+  }
+
+  private persistCurrentPreset(): void {
+    let data = {
+      width: ViewPage.getCurrentWidth(),
+      height: ViewPage.getCurrentHeight(),
+      label: ViewPage.getCurrentLabel()
+    };
+    this.addToQueue(this.storagePrefix + 'current', data);
+  }
+
+  private persistCustomPreset(): void {
+    let data = {
+      width: ViewPage.getCurrentWidth(),
+      height: ViewPage.getCurrentHeight()
+    };
+    $(Selectors.customSelector).data('width', data.width);
+    $(Selectors.customSelector).data('height', data.height);
+    $(Selectors.customWidthSelector).html(data.width);
+    $(Selectors.customHeightSelector).html(data.height);
+    this.addToQueue(this.storagePrefix + 'custom', data);
+  }
+
+  private persistCustomPresetAfterChange(): void {
+    clearTimeout(this.queueDelayTimer);
+    this.queueDelayTimer = window.setTimeout(() => { this.persistCustomPreset(); }, 1000);
+  }
+
+  /**
+   * Initialize
+   */
+  private initialize (): void {
+    // Change orientation
+    $(document).on('click', Selectors.changeOrientationSelector, (): void => {
+      const width = $(Selectors.inputHeightSelector).val();
+      const height = $(Selectors.inputWidthSelector).val();
+      this.setSize(width, height);
+      this.persistCurrentPreset();
+    });
+
+    // On change
+    $(document).on('change', Selectors.inputWidthSelector, (): void => {
+      const width = $(Selectors.inputWidthSelector).val();
+      const height = $(Selectors.inputHeightSelector).val();
+      this.setSize(width, height);
+      ViewPage.setLabel(this.defaultLabel);
+      this.persistCustomPresetAfterChange();
+    });
+    $(document).on('change', Selectors.inputHeightSelector, (): void => {
+      const width = $(Selectors.inputWidthSelector).val();
+      const height = $(Selectors.inputHeightSelector).val();
+      this.setSize(width, height);
+      ViewPage.setLabel(this.defaultLabel);
+      this.persistCustomPresetAfterChange();
+    });
+
+    // Add event to width selector so the container is resized
+    $(document).on('click', Selectors.changePresetSelector, (evt: JQueryEventObject): void => {
+      const data = $(evt.currentTarget).data();
+      this.setSize(parseInt(data.width, 10), parseInt(data.height, 10));
+      ViewPage.setLabel(data.label);
+      this.persistCurrentPreset();
+    });
+
+    // Initialize the jQuery UI Resizable plugin
+    this.$resizableContainer.resizable({
+      handles: 'w, sw, s, se, e'
+    });
+
+    this.$resizableContainer.on('resizestart', (evt: JQueryEventObject): void => {
+      // Add iframe overlay to prevent losing the mouse focus to the iframe while resizing fast
+      $(evt.currentTarget)
+        .append('<div id="this-iframe-cover" style="z-index:99;position:absolute;width:100%;top:0;left:0;height:100%;"></div>');
+    });
+
+    this.$resizableContainer.on('resize', (evt: JQueryEventObject, ui: JQueryUI.ResizableUIParams): void => {
+      ui.size.width = ui.originalSize.width + ((ui.size.width - ui.originalSize.width) * 2);
+      if (ui.size.height < this.minimalHeight) {
+        ui.size.height = this.minimalHeight;
+      }
+      if (ui.size.width < this.minimalWidth) {
+        ui.size.width = this.minimalWidth;
+      }
+      $(Selectors.inputWidthSelector).val(ui.size.width);
+      $(Selectors.inputHeightSelector).val(ui.size.height);
+      this.$resizableContainer.css({
+        left: 0
+      });
+      ViewPage.setLabel(this.defaultLabel);
+    });
+
+    this.$resizableContainer.on('resizestop', (): void => {
+      $('#viewpage-iframe-cover').remove();
+      this.persistCurrentPreset();
+      this.persistCustomPreset();
+    });
+  }
+
+  private calculateContainerMaxHeight(): number {
+    this.$resizableContainer.hide();
+    let $moduleBody = $(Selectors.moduleBodySelector);
+    let padding = $moduleBody.outerHeight() - $moduleBody.height(),
+      documentHeight = $(document).height(),
+      topbarHeight = $(Selectors.topbarContainerSelector).outerHeight();
+    this.$resizableContainer.show();
+    return documentHeight - padding - topbarHeight - 8;
+  }
+
+  private calculateContainerMaxWidth(): number {
+    this.$resizableContainer.hide();
+    let $moduleBody: JQuery = $(Selectors.moduleBodySelector);
+    let padding: number = $moduleBody.outerWidth() - $moduleBody.width();
+    let documentWidth: number = $(document).width();
+    this.$resizableContainer.show();
+    return parseInt((documentWidth - padding) + '', 10);
+  }
+}
+
+export = new ViewPage();
index 590259a..1c7ca8c 100644 (file)
  *
  * The TYPO3 project - inspiring people to share!
  */
-/**
- * Module: TYPO3/CMS/Viewpage/Main
- * Main logic for resizing the view of the frame
- */
-define([
-  'jquery',
-  'TYPO3/CMS/Backend/Storage/Persistent',
-  'jquery-ui/resizable'
-], function($, PersistentStorage) {
-  'use strict';
-
-  /**
-   * @type {{<resizableContainerIdentifier: string, sizeIdentifier: string, moduleBodySelector: string, storagePrefix: string, $iframe: null, $resizableContainer: null, $sizeSelector: null}}
-   * @exports TYPO3/CMS/Viewpage/Main
-   */
-  var ViewPage = {
-
-    resizableContainerIdentifier: '.t3js-viewpage-resizeable',
-    sizeIdentifier: ' .t3js-viewpage-size',
-    moduleBodySelector: '.t3js-module-body',
-
-    defaultLabel: $('.t3js-preset-custom-label').html().trim(),
-    minimalHeight: 300,
-    minimalWidth: 300,
-
-    storagePrefix: 'moduleData.web_view.States.',
-    $iframe: null,
-    $resizableContainer: null,
-    $sizeSelector: null,
-
-    customSelector: '.t3js-preset-custom',
-    customWidthSelector: '.t3js-preset-custom-width',
-    customHeightSelector: '.t3js-preset-custom-height',
-
-    changeOrientationSelector: '.t3js-change-orientation',
-    changePresetSelector: '.t3js-change-preset',
-
-    inputWidthSelector: '.t3js-viewpage-input-width',
-    inputHeightSelector: '.t3js-viewpage-input-height',
-
-    currentLabelSelector: '.t3js-viewpage-current-label',
-    topbarContainerSelector: '.t3js-viewpage-topbar',
-
-    queue: [],
-    queueIsRunning: false,
-    queueDelayTimer: null
-
-  };
-
-  ViewPage.persistQueue = function() {
-    if (ViewPage.queueIsRunning === false && ViewPage.queue.length >= 1) {
-      ViewPage.queueIsRunning = true;
-      var item = ViewPage.queue.shift();
-      PersistentStorage.set(item.storageIdentifier, item.data).done(function() {
-        ViewPage.queueIsRunning = false;
-        ViewPage.persistQueue();
-      });
-    }
-  }
-
-  ViewPage.addToQueue = function(storageIdentifier, data) {
-    var item = {
-      'storageIdentifier': storageIdentifier,
-      'data': data
-    };
-    ViewPage.queue.push(item);
-    if (ViewPage.queue.length >= 1) {
-      ViewPage.persistQueue();
-    }
-  }
-
-  ViewPage.setSize = function(width, height) {
-    if (isNaN(height)) {
-      height = ViewPage.calculateContainerMaxHeight();
-    }
-    if (height < ViewPage.minimalHeight) {
-      height = ViewPage.minimalHeight;
-    }
-    if (isNaN(width)) {
-      width = ViewPage.calculateContainerMaxWidth();
-    }
-    if (width < ViewPage.minimalWidth) {
-      width = ViewPage.minimalWidth;
-    }
-
-    $(ViewPage.inputWidthSelector).val(width);
-    $(ViewPage.inputHeightSelector).val(height);
-
-    ViewPage.$resizableContainer.css({
-      width: width,
-      height: height,
-      left: 0
-    });
-  }
-
-  ViewPage.getCurrentWidth = function() {
-    return $(ViewPage.inputWidthSelector).val();
-  }
-
-  ViewPage.getCurrentHeight = function() {
-    return $(ViewPage.inputHeightSelector).val();
-  }
-
-  ViewPage.setLabel = function(label) {
-    $(ViewPage.currentLabelSelector).html(label);
-  }
-
-  ViewPage.getCurrentLabel = function() {
-    return $(ViewPage.currentLabelSelector).html().trim();
-  }
-
-  ViewPage.persistCurrentPreset = function() {
-    var data = {
-      width: ViewPage.getCurrentWidth(),
-      height: ViewPage.getCurrentHeight(),
-      label: ViewPage.getCurrentLabel()
-    }
-    ViewPage.addToQueue(ViewPage.storagePrefix + 'current', data);
-  }
-
-  ViewPage.persistCustomPreset = function() {
-    var data = {
-      width: ViewPage.getCurrentWidth(),
-      height: ViewPage.getCurrentHeight()
-    }
-    $(ViewPage.customSelector).data("width", data.width);
-    $(ViewPage.customSelector).data("height", data.height);
-    $(ViewPage.customWidthSelector).html(data.width);
-    $(ViewPage.customHeightSelector).html(data.height);
-    ViewPage.addToQueue(ViewPage.storagePrefix + 'custom', data);
-  }
-
-  ViewPage.persistCustomPresetAfterChange = function() {
-    clearTimeout(ViewPage.queueDelayTimer);
-    ViewPage.queueDelayTimer = setTimeout(function() {
-      ViewPage.persistCustomPreset();
-    }, 1000);
-  };
-
-  /**
-   * Initialize
-   */
-  ViewPage.initialize = function() {
-
-    ViewPage.$iframe = $('#tx_viewpage_iframe');
-    ViewPage.$resizableContainer = $(ViewPage.resizableContainerIdentifier);
-    ViewPage.$sizeSelector = $(ViewPage.sizeIdentifier);
-
-    // Change orientation
-    $(document).on('click', ViewPage.changeOrientationSelector, function() {
-      var width = $(ViewPage.inputHeightSelector).val();
-      var height = $(ViewPage.inputWidthSelector).val();
-      ViewPage.setSize(width, height);
-      ViewPage.persistCurrentPreset();
-    });
-
-    // On change
-    $(document).on('change', ViewPage.inputWidthSelector, function() {
-      var width = $(ViewPage.inputWidthSelector).val();
-      var height = $(ViewPage.inputHeightSelector).val();
-      ViewPage.setSize(width, height);
-      ViewPage.setLabel(ViewPage.defaultLabel);
-      ViewPage.persistCustomPresetAfterChange();
-    });
-    $(document).on('change', ViewPage.inputHeightSelector, function() {
-      var width = $(ViewPage.inputWidthSelector).val();
-      var height = $(ViewPage.inputHeightSelector).val();
-      ViewPage.setSize(width, height);
-      ViewPage.setLabel(ViewPage.defaultLabel);
-      ViewPage.persistCustomPresetAfterChange();
-    });
-
-    // Add event to width selector so the container is resized
-    $(document).on('click', ViewPage.changePresetSelector, function() {
-      var data = $(this).data();
-      ViewPage.setSize(parseInt(data.width), parseInt(data.height));
-      ViewPage.setLabel(data.label);
-      ViewPage.persistCurrentPreset();
-    });
-
-    // Initialize the jQuery UI Resizable plugin
-    ViewPage.$resizableContainer.resizable({
-      handles: 'w, sw, s, se, e'
-    });
-
-    ViewPage.$resizableContainer.on('resizestart', function() {
-      // Add iframe overlay to prevent losing the mouse focus to the iframe while resizing fast
-      $(this).append('<div id="viewpage-iframe-cover" style="z-index:99;position:absolute;width:100%;top:0;left:0;height:100%;"></div>');
-    });
-
-    ViewPage.$resizableContainer.on('resize', function(evt, ui) {
-      ui.size.width = ui.originalSize.width + ((ui.size.width - ui.originalSize.width) * 2);
-      if (ui.size.height < ViewPage.minimalHeight) {
-        ui.size.height = ViewPage.minimalHeight;
-      }
-      if (ui.size.width < ViewPage.minimalWidth) {
-        ui.size.width = ViewPage.minimalWidth;
-      }
-      $(ViewPage.inputWidthSelector).val(ui.size.width);
-      $(ViewPage.inputHeightSelector).val(ui.size.height);
-      ViewPage.$resizableContainer.css({
-        left: 0
-      });
-      ViewPage.setLabel(ViewPage.defaultLabel);
-    });
-
-    ViewPage.$resizableContainer.on('resizestop', function() {
-      $('#viewpage-iframe-cover').remove();
-      ViewPage.persistCurrentPreset();
-      ViewPage.persistCustomPreset();
-    });
-  };
-
-  /**
-   * @returns {Number}
-   */
-  ViewPage.calculateContainerMaxHeight = function() {
-    ViewPage.$resizableContainer.hide();
-    var $moduleBody = $(ViewPage.moduleBodySelector);
-    var padding = $moduleBody.outerHeight() - $moduleBody.height(),
-      documentHeight = $(document).height(),
-      topbarHeight = $(ViewPage.topbarContainerSelector).outerHeight();
-    ViewPage.$resizableContainer.show();
-    return documentHeight - padding - topbarHeight - 8;
-  };
-
-  /**
-   * @returns {Number}
-   */
-  ViewPage.calculateContainerMaxWidth = function() {
-    ViewPage.$resizableContainer.hide();
-    var $moduleBody = $(ViewPage.moduleBodySelector);
-    var padding = $moduleBody.outerWidth() - $moduleBody.width(),
-      documentWidth = $(document).width();
-    ViewPage.$resizableContainer.show();
-    return parseInt(documentWidth - padding);
-  };
-
-  /**
-   * @param {String} url
-   * @returns {{}}
-   */
-  ViewPage.getUrlVars = function(url) {
-    var vars = {};
-    var hash;
-    var hashes = url.slice(url.indexOf('?') + 1).split('&');
-    for (var i = 0; i < hashes.length; i++) {
-      hash = hashes[i].split('=');
-      vars[hash[0]] = hash[1];
-    }
-    return vars;
-  };
-
-  $(ViewPage.initialize);
-
-  return ViewPage;
-});
+define(["require","exports","jquery","TYPO3/CMS/Backend/Storage/Persistent","jquery-ui/resizable"],function(e,t,i,r){"use strict";var n,s;return(s=n||(n={})).resizableContainerIdentifier=".t3js-viewpage-resizeable",s.sizeIdentifier=".t3js-viewpage-size",s.moduleBodySelector=".t3js-module-body",s.customSelector=".t3js-preset-custom",s.customWidthSelector=".t3js-preset-custom",s.customHeightSelector=".t3js-preset-custom-height",s.changeOrientationSelector=".t3js-change-orientation",s.changePresetSelector=".t3js-change-preset",s.inputWidthSelector=".t3js-viewpage-input-width",s.inputHeightSelector=".t3js-viewpage-input-height",s.currentLabelSelector=".t3js-viewpage-current-label",s.topbarContainerSelector=".t3js-viewpage-topbar",new(function(){function e(){var e=this;this.defaultLabel="",this.minimalHeight=300,this.minimalWidth=300,this.storagePrefix="moduleData.web_view.States.",this.queue=[],this.queueIsRunning=!1,i(function(){var t=i(".t3js-preset-custom-label");e.defaultLabel=t.length>0?t.html().trim():"",e.$iframe=i("#tx_this_iframe"),e.$resizableContainer=i(n.resizableContainerIdentifier),e.$sizeSelector=i(n.sizeIdentifier),e.initialize()})}return e.getCurrentWidth=function(){return i(n.inputWidthSelector).val()},e.getCurrentHeight=function(){return i(n.inputHeightSelector).val()},e.setLabel=function(e){i(n.currentLabelSelector).html(e)},e.getCurrentLabel=function(){return i(n.currentLabelSelector).html().trim()},e.prototype.persistQueue=function(){var e=this;if(!1===this.queueIsRunning&&this.queue.length>=1){this.queueIsRunning=!0;var t=this.queue.shift();r.set(t.storageIdentifier,t.data).done(function(){e.queueIsRunning=!1,e.persistQueue()})}},e.prototype.addToQueue=function(e,t){var i={storageIdentifier:e,data:t};this.queue.push(i),this.queue.length>=1&&this.persistQueue()},e.prototype.setSize=function(e,t){isNaN(t)&&(t=this.calculateContainerMaxHeight()),t<this.minimalHeight&&(t=this.minimalHeight),isNaN(e)&&(e=this.calculateContainerMaxWidth()),e<this.minimalWidth&&(e=this.minimalWidth),i(n.inputWidthSelector).val(e),i(n.inputHeightSelector).val(t),this.$resizableContainer.css({width:e,height:t,left:0})},e.prototype.persistCurrentPreset=function(){var t={width:e.getCurrentWidth(),height:e.getCurrentHeight(),label:e.getCurrentLabel()};this.addToQueue(this.storagePrefix+"current",t)},e.prototype.persistCustomPreset=function(){var t={width:e.getCurrentWidth(),height:e.getCurrentHeight()};i(n.customSelector).data("width",t.width),i(n.customSelector).data("height",t.height),i(n.customWidthSelector).html(t.width),i(n.customHeightSelector).html(t.height),this.addToQueue(this.storagePrefix+"custom",t)},e.prototype.persistCustomPresetAfterChange=function(){var e=this;clearTimeout(this.queueDelayTimer),this.queueDelayTimer=window.setTimeout(function(){e.persistCustomPreset()},1e3)},e.prototype.initialize=function(){var t=this;i(document).on("click",n.changeOrientationSelector,function(){var e=i(n.inputHeightSelector).val(),r=i(n.inputWidthSelector).val();t.setSize(e,r),t.persistCurrentPreset()}),i(document).on("change",n.inputWidthSelector,function(){var r=i(n.inputWidthSelector).val(),s=i(n.inputHeightSelector).val();t.setSize(r,s),e.setLabel(t.defaultLabel),t.persistCustomPresetAfterChange()}),i(document).on("change",n.inputHeightSelector,function(){var r=i(n.inputWidthSelector).val(),s=i(n.inputHeightSelector).val();t.setSize(r,s),e.setLabel(t.defaultLabel),t.persistCustomPresetAfterChange()}),i(document).on("click",n.changePresetSelector,function(r){var n=i(r.currentTarget).data();t.setSize(parseInt(n.width,10),parseInt(n.height,10)),e.setLabel(n.label),t.persistCurrentPreset()}),this.$resizableContainer.resizable({handles:"w, sw, s, se, e"}),this.$resizableContainer.on("resizestart",function(e){i(e.currentTarget).append('<div id="this-iframe-cover" style="z-index:99;position:absolute;width:100%;top:0;left:0;height:100%;"></div>')}),this.$resizableContainer.on("resize",function(r,s){s.size.width=s.originalSize.width+2*(s.size.width-s.originalSize.width),s.size.height<t.minimalHeight&&(s.size.height=t.minimalHeight),s.size.width<t.minimalWidth&&(s.size.width=t.minimalWidth),i(n.inputWidthSelector).val(s.size.width),i(n.inputHeightSelector).val(s.size.height),t.$resizableContainer.css({left:0}),e.setLabel(t.defaultLabel)}),this.$resizableContainer.on("resizestop",function(){i("#viewpage-iframe-cover").remove(),t.persistCurrentPreset(),t.persistCustomPreset()})},e.prototype.calculateContainerMaxHeight=function(){this.$resizableContainer.hide();var e=i(n.moduleBodySelector),t=e.outerHeight()-e.height(),r=i(document).height(),s=i(n.topbarContainerSelector).outerHeight();return this.$resizableContainer.show(),r-t-s-8},e.prototype.calculateContainerMaxWidth=function(){this.$resizableContainer.hide();var e=i(n.moduleBodySelector),t=e.outerWidth()-e.width(),r=i(document).width();return this.$resizableContainer.show(),parseInt(r-t+"",10)},e}())});
\ No newline at end of file