From 654c31db23a6ac6eb92d03ee70d97b3095ebeb25 Mon Sep 17 00:00:00 2001 From: zhuyinlong <1158756092@qq.com> Date: Wed, 8 Nov 2023 11:49:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/static/css/skins_new.css | 4 ++- admin/src/main/resources/static/css/style.css | 2 +- .../properties-default-controllers.js | 36 +++++++++++++++++-- .../editor-app/configuration/properties.js | 4 +++ .../properties/jsontext-popup.html | 21 +++++++++++ .../jsontext-property-write-template.html | 4 +++ .../static/designer/editor-app/css/style.css | 30 +++++++++++++--- .../designer/editor-app/editor-controller.js | 2 +- .../designer/editor-app/stencil-controller.js | 1 + .../designer/editor-app/stencilset.json | 2 +- .../main/resources/static/designer/index.html | 4 ++- .../resources/static/designer/scripts/app.js | 3 +- .../resources/templates/index-topnav.html | 7 ++-- 13 files changed, 104 insertions(+), 16 deletions(-) create mode 100644 admin/src/main/resources/static/designer/editor-app/configuration/properties/jsontext-popup.html create mode 100644 admin/src/main/resources/static/designer/editor-app/configuration/properties/jsontext-property-write-template.html diff --git a/admin/src/main/resources/static/css/skins_new.css b/admin/src/main/resources/static/css/skins_new.css index ecb73ef..7de6010 100644 --- a/admin/src/main/resources/static/css/skins_new.css +++ b/admin/src/main/resources/static/css/skins_new.css @@ -35,6 +35,7 @@ .skin-light .navbar .nav .open>a:focus, .skin-light .navbar .nav>.active>a { background: #0D6EFD; + box-shadow: 0px 0px 5px #333333; } .skin-light .navbar .sidebar-toggle { @@ -69,7 +70,8 @@ .skin-light .logo { background-color: #0D6EFD; /*color: #63686e;*/ - border-bottom: 0 solid transparent + border-bottom: 0 solid transparent; + line-height: 46px; } .skin-light li.user-header { diff --git a/admin/src/main/resources/static/css/style.css b/admin/src/main/resources/static/css/style.css index 7b62d84..e223f15 100644 --- a/admin/src/main/resources/static/css/style.css +++ b/admin/src/main/resources/static/css/style.css @@ -134,7 +134,7 @@ body.body-small .navbar-top-links li:last-child { .dropdown-menu>li>a { border-radius: 3px; - color: inherit; + color: #777; line-height: 25px; margin: 4px; text-align: left; diff --git a/admin/src/main/resources/static/designer/editor-app/configuration/properties-default-controllers.js b/admin/src/main/resources/static/designer/editor-app/configuration/properties-default-controllers.js index c31fe4d..f1816a1 100644 --- a/admin/src/main/resources/static/designer/editor-app/configuration/properties-default-controllers.js +++ b/admin/src/main/resources/static/designer/editor-app/configuration/properties-default-controllers.js @@ -99,17 +99,49 @@ angular.module('flowableModeler').controller('FlowableTextPropertyCtrl', [ '$sco $scope.property.mode = 'read'; }, 0); }); - + // Open the dialog _internalCreateModal(opts, $modal, $scope); }]); - angular.module('flowableModeler').controller('FlowableTextPropertyPopupCtrl', ['$scope', function($scope) { $scope.save = function() { $scope.updatePropertyInModel($scope.property); $scope.close(); }; + + $scope.close = function() { + $scope.property.mode = 'read'; + $scope.$hide(); + }; +}]); + +/* + * Json Text controller + */ +angular.module('flowableModeler').controller('FlowableJsonTextPropertyCtrl', [ '$scope', '$modal', '$timeout', function($scope, $modal, $timeout) { + + var opts = { + template: 'editor-app/configuration/properties/jsontext-popup.html?version=' + Date.now(), + scope: $scope, + prefixEvent: 'jsonTextModalEvent' + }; + + $scope.$on('jsonTextModalEvent.hide.before', function() { + $timeout(function() { + $scope.property.mode = 'read'; + }, 0); + }); + + // Open the dialog + _internalCreateModal(opts, $modal, $scope); +}]); +angular.module('flowableModeler').controller('FlowableJsonTextPropertyPopupCtrl', ['$scope', function($scope) { + + $scope.save = function() { + $scope.updatePropertyInModel($scope.property); + $scope.close(); + }; $scope.close = function() { $scope.property.mode = 'read'; diff --git a/admin/src/main/resources/static/designer/editor-app/configuration/properties.js b/admin/src/main/resources/static/designer/editor-app/configuration/properties.js index 8b7c264..513c51e 100644 --- a/admin/src/main/resources/static/designer/editor-app/configuration/properties.js +++ b/admin/src/main/resources/static/designer/editor-app/configuration/properties.js @@ -26,6 +26,10 @@ FLOWABLE.PROPERTY_CONFIG = "readModeTemplateUrl": "editor-app/configuration/properties/default-value-display-template.html", "writeModeTemplateUrl": "editor-app/configuration/properties/text-property-write-template.html" }, + "jsontext" : { + "readModeTemplateUrl": "editor-app/configuration/properties/default-value-display-template.html", + "writeModeTemplateUrl": "editor-app/configuration/properties/jsontext-property-write-template.html" + }, "flowable-calledelementtype" : { "readModeTemplateUrl": "editor-app/configuration/properties/default-value-display-template.html", "writeModeTemplateUrl": "editor-app/configuration/properties/calledelementtype-property-write-template.html" diff --git a/admin/src/main/resources/static/designer/editor-app/configuration/properties/jsontext-popup.html b/admin/src/main/resources/static/designer/editor-app/configuration/properties/jsontext-popup.html new file mode 100644 index 0000000..69151d7 --- /dev/null +++ b/admin/src/main/resources/static/designer/editor-app/configuration/properties/jsontext-popup.html @@ -0,0 +1,21 @@ + +