or
01.function ResizeWindow()02.{03. //Get the Kendo PopUp Window04. var popUpWindow = $(".k-popup-edit-form").data("kendoWindow");05. //Get the inner content area of the editoring window06. var contentArea = $(".k-edit-form-container");07. //Get the actual form that is used for editing (using the bootstrap .form-horizontal to indicate forms)08. var innerForm = $(".form-horizontal");09. //Get 80% of current browser window height/width and set the editing window to these10. contentArea.height($(window).innerHeight() * 0.8).width($(window).innerWidth() * 0.8);11. // re-center the editing window otherwise it will position towards top-right and partially of screen12. popUpWindow.center();13. 14. //Get the viewable content area height and minus 70px so that the buttons are viewable15. var fixedHeight = (contentArea.height() - 70);16. //set the viewable content width to 99% of the editing screen. (otherwise get a X-Scrollbar)17. var fixedWidth = contentArea.width() * 0.99;18. 19. //configure the editing form and set max height, max width and overflow options. 20. //using !important as otherwise this gets overridden 21. innerForm.height(fixedHeight).width(fixedWidth).css({22. maxHeight: fixedHeight + 'px !important',23. maxWidth:fixedWidth + 'px !important', 24. overflowY: 'scroll',25. overflowX: 'hidden'26. 27. });28.}
