979a0b27f1d42e11c4443dfa09f3033dfff8df78
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Resources / Public / JavaScript / Viewport.js
1 /*
2 * This file is part of the TYPO3 CMS project.
3 *
4 * It is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU General Public License, either version 2
6 * of the License, or any later version.
7 *
8 * For the full copyright and license information, please read the
9 * LICENSE.txt file that was distributed with this source code.
10 *
11 * The TYPO3 project - inspiring people to share!
12 */
13 define(["require","exports","jquery","./Viewport/ContentContainer","./Event/ConsumerScope","./Viewport/Loader","./Viewport/NavigationContainer","./Viewport/Topbar"],function(t,n,o,i,e,a,r,s){"use strict";var c,u=function(){function t(){var t=this;this.Loader=a,this.Topbar=s,this.NavigationContainer=null,this.ContentContainer=null,this.consumerScope=e,o(function(){t.initialize()}),this.NavigationContainer=new r(this.consumerScope),this.ContentContainer=new i(this.consumerScope)}return t.prototype.initialize=function(){var t=this;this.doLayout(),o(window).on("resize",function(){t.doLayout()})},t.prototype.doLayout=function(){this.NavigationContainer.cleanup(),this.NavigationContainer.calculateScrollbar(),o(".t3js-topbar-header").css("padding-right",o(".t3js-scaffold-toolbar").outerWidth())},t}();return top.TYPO3.Backend?c=top.TYPO3.Backend:(c=new u,top.TYPO3.Backend=c),c});