From 6adb590f29c9f2ccd3270fc10334c1c0859d92e7 Mon Sep 17 00:00:00 2001 From: xg353y Date: Tue, 12 Mar 2019 16:32:40 +0100 Subject: Fix bugs in UI Fix bugs in UI and remove useless menu and files. Issue-ID: CLAMP-318 Change-Id: Iac797a3c9a014c77da4b7f7f174a2d2d0e538872 Signed-off-by: xg353y --- .../resources/designer/modeler/dist/index.html | 2 +- .../partials/portfolios/ConfirmRevertChanges.html | 47 ---------------------- .../resources/designer/scripts/CldsModelService.js | 12 ++---- .../designer/scripts/ToscaModelService.js | 7 ---- .../META-INF/resources/designer/scripts/app.js | 26 +----------- .../resources/designer/scripts/menuHandler.js | 6 --- 6 files changed, 5 insertions(+), 95 deletions(-) delete mode 100644 src/main/resources/META-INF/resources/designer/partials/portfolios/ConfirmRevertChanges.html (limited to 'src/main/resources/META-INF') diff --git a/src/main/resources/META-INF/resources/designer/modeler/dist/index.html b/src/main/resources/META-INF/resources/designer/modeler/dist/index.html index dd88ec24f..6b8efedfd 100644 --- a/src/main/resources/META-INF/resources/designer/modeler/dist/index.html +++ b/src/main/resources/META-INF/resources/designer/modeler/dist/index.html @@ -41,7 +41,7 @@ -
+
diff --git a/src/main/resources/META-INF/resources/designer/partials/portfolios/ConfirmRevertChanges.html b/src/main/resources/META-INF/resources/designer/partials/portfolios/ConfirmRevertChanges.html deleted file mode 100644 index 9c66d4ef1..000000000 --- a/src/main/resources/META-INF/resources/designer/partials/portfolios/ConfirmRevertChanges.html +++ /dev/null @@ -1,47 +0,0 @@ - - -
- - - -
- diff --git a/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js b/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js index 8a6981cb8..5848f5432 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js +++ b/src/main/resources/META-INF/resources/designer/scripts/CldsModelService.js @@ -259,24 +259,18 @@ app } function manageCLImage(modelName) { getModelImage(modelName).then(function(pars) { - //var svg=' VesCollector third_app first_app second_app Policy '; - var svg = pars; + //var svg=' VES TCA Policy '; + var svg = pars; if ($("#svgContainer").length > 0) $("#svgContainer").remove(); $("#js-canvas").append( "" + svg + ""); - /* added code for height width viewBox */ - $("#svgContainer svg").removeAttr("height"); - $("#svgContainer svg").removeAttr('viewBox'); - $("#svgContainer svg").removeAttr('width'); $("#svgContainer svg").attr('width', '100%'); $("#svgContainer svg").attr('height', '100%'); $("#svgContainer").click( function(event) { console.log("svgContainer:" + $("#svgContainer svg")); - // console.log($(event.target).parent().html()) - // console.log($($(event.target).parent()).attr("data-element-id")) - var name = $($(event.target).parent()).attr("data-element-id") + var name = $($($($(event.target).parent()).parent()).parent()).attr("data-element-id") lastElementSelected = $($(event.target).parent()).attr( "data-element-id") checkIfElementType(name) diff --git a/src/main/resources/META-INF/resources/designer/scripts/ToscaModelService.js b/src/main/resources/META-INF/resources/designer/scripts/ToscaModelService.js index 261a69c6e..c99a4556b 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/ToscaModelService.js +++ b/src/main/resources/META-INF/resources/designer/scripts/ToscaModelService.js @@ -35,11 +35,4 @@ app.service('toscaModelService', ['alertService','$http', '$q', '$rootScope', fu return response.data; }); }; - this.getMsProperties = function(policyType) { - setTimeout(function(){ alert("Hello"); }, 3000); - return getMsUI(policyType); - }; - - - }]); diff --git a/src/main/resources/META-INF/resources/designer/scripts/app.js b/src/main/resources/META-INF/resources/designer/scripts/app.js index 9ae2697e6..59a27bdfe 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/app.js +++ b/src/main/resources/META-INF/resources/designer/scripts/app.js @@ -257,8 +257,6 @@ function($scope, $rootScope, $timeout, dialogs) { window.open(value); } else if (name == "Contact Us") { $rootScope.contactUs(); - } else if (name == "Revert Model Changes") { - $scope.cldsRevertModel(); } else if (name == "Close Model") { $scope.cldsClose(); } else if (name == "Open CL") { @@ -298,9 +296,6 @@ function($scope, $rootScope, $timeout, dialogs) { }, { link : "/cldsOpenModelProperties", name : "Properties CL" - }, { - link : "/RevertChanges", - name : "Revert Model Changes" }, { link : "/Close", name : "Close Model" @@ -312,7 +307,7 @@ function($scope, $rootScope, $timeout, dialogs) { // disabled for Dublin since Policy doesn't support updating in this release // link : "/cldsUpdate", // name : "Update" - }, { + //}, { link : "/cldsStop", name : "Stop" }, { @@ -497,25 +492,6 @@ function($scope, $rootScope, $timeout, dialogs) { callBack(null); }); }; - $scope.cldsRevertModel = function() { - - var dlg = dialogs.create( - 'partials/portfolios/ConfirmRevertChanges.html', - 'CldsOpenModelCtrl', { - closable : true, - draggable : true - }, { - size : 'lg', - keyboard : true, - backdrop : 'static', - windowClass : 'my-class' - }); - dlg.result.then(function(name) { - - }, function() { - - }); - }; $rootScope.cldsOpenModelProperties = function() { var dlg = dialogs.create( diff --git a/src/main/resources/META-INF/resources/designer/scripts/menuHandler.js b/src/main/resources/META-INF/resources/designer/scripts/menuHandler.js index 43c9275f4..1509d3e1a 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/menuHandler.js +++ b/src/main/resources/META-INF/resources/designer/scripts/menuHandler.js @@ -61,13 +61,7 @@ function enableDefaultMenu() { .remove('ThisLink'); document.getElementById('Close Model').classList .remove('ThisLink'); - // disable models options - document.getElementById('Save CL').classList.add('ThisLink'); - document.getElementById('Revert Model Changes').classList - .add('ThisLink'); } else { - // enable menu options - document.getElementById('Save CL').classList.remove('ThisLink'); document.getElementById('Properties CL').classList .remove('ThisLink'); document.getElementById('Revert Model Changes').classList -- cgit 1.2.3-korg