").css({
+ 'height': paramO.height + barHeight + collapsePaneHeight,
+ 'width': document.body.offsetWidth
+ });
+ var paramsTemplateHeight = (paramO.useParamsTemplate && paramsTemplate !== null ? 30 : 0);
+ FR.parameterContainerHeight = paramO.height + barHeight + collapsePaneHeight + paramsTemplateHeight;
+ options.$paraContainer = $paraContainer;
+ config.onCalculate = function (currentMaxHeight) {
+ if ($.isFunction(options.onCalculate)) {
+ options.onCalculate.call(this, currentMaxHeight + deltaHeight, collapsePaneHeight, $paraContainer);
+ }
+ };
+ var $expandEl = $("
").click(function () {
+ var resizeTime = new Date();
+ self.lastResizeTime = resizeTime;
+ setTimeout(function () {
+ if (resizeTime === self.lastResizeTime) {
+ delete self.lastResizeTime;
+ $paraContainer.animate({
+ height: (self.hasCollapsed ? "+=" : "-=") + (paramO.height + paramsTemplateHeight)
+ }, "fast", function () {
+ if (self.hasCollapsed) {
+ FR.parameterContainerHeight += (paramO.height + paramsTemplateHeight);
+ } else {
+ FR.parameterContainerHeight -= (paramO.height + paramsTemplateHeight);
+ }
+ self.hasCollapsed = !self.hasCollapsed;
+ $expandEl.switchClass('parameter-container-collapseimg-down', 'parameter-container-collapseimg-up');
+ if ($.isFunction(options.onCollapse)) {
+ var height = $paraContainer.height();
+ options.onCollapse.call(this, self.hasCollapsed, options.alignLayoutName, height);
+ self.doAfterCollapse();
+ self.afterLoad();
+ }
+ });
+ }
+ }, 222);
+ });
+
+ var alignment = 'left';
+ switch (paramO.alignLocation) {
+ case 0 :
+ alignment = 'left';
+ break;
+ case 1 :
+ alignment = 'center';
+ break;
+ case 2 :
+ alignment = 'right';
+ break;
+ default :
+ alignment = 'left';
+ }
+ var $center = $('
').css({
+ "height": paramO.height,
+ "width": paramO.width
+ });
+ var paramstemplateHeight = 30;
+ var paramstemplateContainer = {
+ region: 'north',
+ height: paramstemplateHeight,
+ el: {
+ type: 'border',
+ widgetName: 'paramsTemplate',
+ items: [
+ {
+ region: 'east',
+ width: 138,
+ el: {
+ type: 'horizontal',
+ alignment: 'right',
+ items: [{
+ el: {
+ type: 'button',
+ widgetName: 'saveBtn',
+ text: FR.i18nText("Fine-Engine_Report_Designer_Save_As_Params_Template")
+ }, width: 128
+ }, {
+ el: $('
'), width: 10
+ }]
+ }
+ }, {
+ region: 'center',
+ el: {
+ type: 'horizontal',
+ widgetName: 'paramsTemplatePane',
+ alignment: 'left',
+ items: []
+ }
+ }, {
+ region: 'west',
+ width: 30,
+ el: {
+ type: 'horizontal',
+ alignment: 'left',
+ items: [
+ {
+ el: {
+ type: 'iconbutton',
+ widgetName: 'newParamsBtn',
+ width: 30,
+ baseClass: 'fs-new-params-template-blue'
+
+ },
+ width: 30
+ }
+ ]
+ }
+ }
+ ]
+ }
+ };
+
+ if (!options.param.useParamsTemplate || paramsTemplate === null) {
+ paramstemplateHeight = 0;
+ paramstemplateContainer = {};
+ }
+ //定义一下用来滚动的对象
+ var paraConfig = {
+ renderEl: $paraContainer,
+ type: 'border',
+ items: [
+ paramstemplateContainer,
+ {
+ region: 'south', height: collapsePaneHeight, el: {
+ type: 'horizontal',
+ items: [
+ {el: $expandEl, width: 120}
+ ]
+ }
+ },
+ {
+ region: 'center', el: {
+ type: 'vertical',//垂直滚动条定制:改成了纵向布局
+ scrollable: true,//垂直滚动条定制:纵向布局允许滚动条
+ width: paramO.width,
+ minWidth: paramO.width,
+ widgetName: options.alignLayoutName,
+ alignment: alignment,
+ items: [
+ {el: $center, width: maxWidth, height: maxHeight + 20} //ezreal:参数面板大小改成最大高度
+ ]
+ }
+ }
+ ]
+ };
+ this._setBackground(paramO, $paraContainer);
+ if (paramO.showType === 1) {
+ layout.push({
+ region: 'north',
+ el: paraConfig,
+ height: paramO.height + collapsePaneHeight + barHeight + paramstemplateHeight
+ });
+ }
+ if (paramO.showType === 0) {
+ $paraContainer.css({
+ position: "absolute",
+ width: paramO.width,
+ height: paramO.height
+ }).appendTo("body");
+ config.listeners = [
+ {
+ once: true,
+ eventName: 'submitcomplete',
+ action: function () {
+ FR.closeDialog();
+ }
+ }
+ ];
+ config.renderEl = $paraContainer;
+ formLayout = new FR.contentForm(config);
+ } else {
+ config.renderEl = $center;
+ config.container = $paraContainer;
+ formLayout = new FR.contentForm(config);
+ }
+ if (paramO.showType === 0) {
+ formLayout.doLayout();
+ FR.showDialog({
+ title: paramO.paramWindowTitle,
+ width: paramO.width + 20,
+ height: paramO.height + 45,
+ contentHtml: $paraContainer
+ });
+ }
+ return formLayout;
+ };
+})(jQuery);
\ No newline at end of file