From e584b4cd7f504db0489f88a6c1dfede7132475a7 Mon Sep 17 00:00:00 2001 From: datagear Date: Sun, 23 Feb 2020 17:26:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E7=9C=8B=E6=9D=BF=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E7=95=8C=E9=9D=A2=E5=8A=9F=E8=83=BD=EF=BC=8C=E5=8F=AF?= =?UTF-8?q?=E6=89=A9=E5=A4=A7=E7=BC=96=E8=BE=91=E5=8C=BA=E5=9F=9F=E4=BE=BF?= =?UTF-8?q?=E4=BA=8E=E7=BC=96=E8=BE=91=E5=92=8C=E6=B5=8F=E8=A7=88HTML?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datagear/web/locales/datagear.properties | 1 + .../staticResource/static/css/common.css | 35 ++++++++++++++---- .../analysis/dashboard/dashboard_form.ftl | 37 ++++++++++++++++--- 3 files changed, 61 insertions(+), 12 deletions(-) diff --git a/datagear-web/src/main/resources/org/datagear/web/locales/datagear.properties b/datagear-web/src/main/resources/org/datagear/web/locales/datagear.properties index c8628c3f..068d57cd 100644 --- a/datagear-web/src/main/resources/org/datagear/web/locales/datagear.properties +++ b/datagear-web/src/main/resources/org/datagear/web/locales/datagear.properties @@ -72,6 +72,7 @@ insert=\u63D2\u5165 copySuccess=\u590D\u5236\u6210\u529F\uFF01 copyToClipboardSuccess=\u5DF2\u590D\u5236\u5230\u526A\u5207\u677F\uFF01 share=\u5206\u4EAB +expandOrCollapse=\u5C55\u5F00/\u6536\u56DE dataFilter.mine=\u6211\u7684 dataFilter.other=\u5206\u4EAB\u7684 diff --git a/datagear-web/src/main/resources/org/datagear/web/webapp/staticResource/static/css/common.css b/datagear-web/src/main/resources/org/datagear/web/webapp/staticResource/static/css/common.css index ad24818a..201e600b 100644 --- a/datagear-web/src/main/resources/org/datagear/web/webapp/staticResource/static/css/common.css +++ b/datagear-web/src/main/resources/org/datagear/web/webapp/staticResource/static/css/common.css @@ -74,7 +74,7 @@ form .form-content .form-item{ } form .form-content .form-item .form-item-label{ display: inline-block; - width: 19%; + width: 20%; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; @@ -89,7 +89,8 @@ form .form-content .form-item .form-item-label label{ } form .form-content .form-item .form-item-value{ display: inline-block; - width: 79%; + width: 80%; + margin-left: -0.5em; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; @@ -2195,6 +2196,12 @@ table.dataTable tbody tr .column-check .row-data-state .ui-icon{ .page-form-dashboard{ position: relative; } +.page-form-dashboard.max-template-editor form .form-content .form-item .form-item-label{ + width: 0; +} +.page-form-dashboard.max-template-editor form .form-content .form-item .form-item-value{ + width: 100%; +} .page-form-dashboard .form-item-value-template{ position: relative; } @@ -2214,7 +2221,7 @@ table.dataTable tbody tr .column-check .row-data-state .ui-icon{ left: 0; top: 0; bottom: 0; - width: 70%; + right: 13.5em; } .page-form-dashboard .template-editor-wrapper .template-editor-parent .template-editor{ position: absolute; @@ -2223,17 +2230,18 @@ table.dataTable tbody tr .column-check .row-data-state .ui-icon{ top: 0; bottom: 0; } -.page-form-dashboard .template-editor-wrapper .insert-chart-button{ +.page-form-dashboard .template-editor-wrapper .insert-chart-button-wrapper{ position: absolute; - left: 71%; + right: 0; top: 0; + width: 13em; } .page-form-dashboard .template-editor-wrapper .dashboard-resource-wrapper{ position: absolute; - left: 71%; right: 0; top: 3em; bottom: 0; + width: 13em; } .page-form-dashboard .template-editor-wrapper .dashboard-resource-wrapper .resource-title{ font-weight: normal; @@ -2278,7 +2286,7 @@ table.dataTable tbody tr .column-check .row-data-state .ui-icon{ .page-form-dashboard .template-editor-wrapper .dashboard-resource-wrapper .add-resource-panel{ position: absolute; display: none; - width: 80%; + width: 120%; right: 0px; top: 1.8em; padding: 0.3em 0.3em; @@ -2307,6 +2315,19 @@ table.dataTable tbody tr .column-check .row-data-state .ui-icon{ padding-top: 0.3em; padding-bottom: 0.3em; } +.page-form-dashboard .form-item-value-template .resize-editor-wrapper{ + position: absolute; + left: -0.7em; + top: -0.5em; + display: inline-block; + z-index: 10; +} +.page-form-dashboard .form-item-value-template .resize-editor-wrapper .ui-button.ui-button-icon-only{ + width: 1.4em; + height: 1.4em; + padding: 0.3em 0.3em; + border: 0; +} .page-form-dashboard .show-button{ position: absolute; top: 0.5em; diff --git a/datagear-web/src/main/resources/org/datagear/web/webapp/view/freemarker/analysis/dashboard/dashboard_form.ftl b/datagear-web/src/main/resources/org/datagear/web/webapp/view/freemarker/analysis/dashboard/dashboard_form.ftl index f2346ea2..b01b299c 100644 --- a/datagear-web/src/main/resources/org/datagear/web/webapp/view/freemarker/analysis/dashboard/dashboard_form.ftl +++ b/datagear-web/src/main/resources/org/datagear/web/webapp/view/freemarker/analysis/dashboard/dashboard_form.ftl @@ -38,7 +38,9 @@ readonly 是否只读操作,允许为null
<#if !readonly> - +
+ +
@@ -73,6 +75,9 @@ readonly 是否只读操作,允许为null
+
+ +
@@ -101,9 +106,9 @@ readonly 是否只读操作,允许为null (function(po) { $.initButtons(po.element()); - var tewHeight = $(window).height()/2; + var tewHeight = $(window).height()*5/9; po.element(".template-editor-wrapper").height(tewHeight); - po.element(".form-item-value-template").height(tewHeight + 35); + po.element(".form-item-value-template").height(tewHeight + 30); po.url = function(action) { @@ -152,6 +157,23 @@ readonly 是否只读操作,允许为null po.element(".resource-content").selectable({classes: {"ui-selected": "ui-state-active"}}); + po.element(".resize-editor-button").click(function() + { + var $ele = po.element(); + var $icon = $(".ui-icon", this); + + if($ele.hasClass("max-template-editor")) + { + $ele.removeClass("max-template-editor"); + $icon.removeClass("ui-icon-arrowstop-1-e").addClass("ui-icon-arrowstop-1-w"); + } + else + { + $ele.addClass("max-template-editor"); + $icon.removeClass("ui-icon-arrowstop-1-w").addClass("ui-icon-arrowstop-1-e"); + } + }); + <#if !readonly> po.getSelectedResourceName = function() { @@ -391,12 +413,14 @@ readonly 是否只读操作,允许为null rules : { "name" : "required", - "templateContent" : "dashboardTemplateContent" + "templateContent" : "dashboardTemplateContent", + "template" : "required" }, messages : { "name" : "<@spring.message code='validation.required' />", - "templateContent" : "<@spring.message code='validation.required' />" + "templateContent" : "<@spring.message code='validation.required' />", + "template" : "<@spring.message code='validation.required' />" }, submitHandler : function(form) { @@ -430,6 +454,9 @@ readonly 是否只读操作,允许为null }); + if(po.element("input[name='id']").val()) + po.element(".resize-editor-button").click(); + po.initTemplateEditor(); po.refreshDashboardResources(); })