From 4531edb6b25e669d1d3cd51241ccf050a6f9c34d Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Tue, 19 Oct 2021 17:55:30 +0200 Subject: [PATCH] Updated progress bar --- .../shared/Constants.java | 1 + src/main/webapp/css/main.css | 46 ++++++++++++++++--- .../simpleProgressBar.jsp | 1 + .../systemservicedefinition/ssd_create.jsp | 6 +-- .../ssd_dialog_progressbar.jsp | 46 ++++++++++++------- .../html/systemservicedefinition/view.jsp | 19 ++++++-- 6 files changed, 88 insertions(+), 31 deletions(-) diff --git a/src/main/java/org/gcube/portlets/admin/systemservicedefinition/shared/Constants.java b/src/main/java/org/gcube/portlets/admin/systemservicedefinition/shared/Constants.java index 359fcf3..3bbeebf 100644 --- a/src/main/java/org/gcube/portlets/admin/systemservicedefinition/shared/Constants.java +++ b/src/main/java/org/gcube/portlets/admin/systemservicedefinition/shared/Constants.java @@ -11,6 +11,7 @@ public class Constants { public static final String DEFAULT_USER = "giancarlo.panichi"; public static final String DEFAULT_SCOPE = "/gcube"; public static final String DEFAULT_TOKEN = ""; + public static final String DEFAULT_ROLE = "OrganizationMember"; // Session diff --git a/src/main/webapp/css/main.css b/src/main/webapp/css/main.css index d8f7559..b35832c 100644 --- a/src/main/webapp/css/main.css +++ b/src/main/webapp/css/main.css @@ -1,8 +1,3 @@ -.system-service-definition-portlet .circle_button { - padding: 1px 1px; - line-height: 1px; - border-radius: 16px !important; -} .system-service-definition-portlet table thead { background: #f8f8f8; @@ -151,13 +146,13 @@ background: #50a2f5; } -.system-service-definition-portlet #simpleProgress { +.progressDialog #simpleProgress { width: 100%; background-color: #ddd; visibility: hidden; } -.system-service-definition-portlet #simpleBar { +.progressDialog #simpleBar { width: 30%; height: 20px; background-color: #50a2f5; @@ -166,4 +161,41 @@ color: white; } +.system-service-definition-portlet .circle_button { + padding: 1px 3px 1px 1px; + line-height: 1px; + border-radius: 12px !important; + height: 30px; +} + + +.system-service-definition-portlet .circle_button_text { + display: inline-block; + vertical-align: middle; + height: 15px; + font-size: medium; +} + + +.system-service-definition-portlet #loader { + border: 16px solid #f3f3f3; + border-radius: 50%; + border-top: 16px solid #3498db; + width: 120px; + height: 120px; + -webkit-animation: spin 2s linear infinite; + animation: spin 2s linear infinite; + margin: auto; +} + + +@-webkit-keyframes spin { + 0% { -webkit-transform: rotate(0deg); } + 100% { -webkit-transform: rotate(360deg); } +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} diff --git a/src/main/webapp/html/systemservicedefinition/simpleProgressBar.jsp b/src/main/webapp/html/systemservicedefinition/simpleProgressBar.jsp index 2c65bd8..1ceddea 100644 --- a/src/main/webapp/html/systemservicedefinition/simpleProgressBar.jsp +++ b/src/main/webapp/html/systemservicedefinition/simpleProgressBar.jsp @@ -50,5 +50,6 @@ function loadingActive(){ move(); } +loadingActive(); diff --git a/src/main/webapp/html/systemservicedefinition/ssd_create.jsp b/src/main/webapp/html/systemservicedefinition/ssd_create.jsp index c6ee1dc..ea10ce7 100644 --- a/src/main/webapp/html/systemservicedefinition/ssd_create.jsp +++ b/src/main/webapp/html/systemservicedefinition/ssd_create.jsp @@ -32,6 +32,8 @@ +<%@include file="ssd_dialog_progressbar.jsp" %> + -<%@include file="simpleProgressBar.jsp" %> - diff --git a/src/main/webapp/html/systemservicedefinition/ssd_dialog_progressbar.jsp b/src/main/webapp/html/systemservicedefinition/ssd_dialog_progressbar.jsp index 9581c47..dcadac2 100644 --- a/src/main/webapp/html/systemservicedefinition/ssd_dialog_progressbar.jsp +++ b/src/main/webapp/html/systemservicedefinition/ssd_dialog_progressbar.jsp @@ -1,20 +1,14 @@ <%@include file="init.jsp"%> - + value="/html/systemservicedefinition/simpleProgressBar.jsp" /> - - -
- - -
- -AUI().use('aui-base', + + +<%-- +footer: [ + { + label: '<%= UnicodeLanguageUtil.get(pageContext, "cancel") %>', + on: { + click: function() { + messagingDialog.hide(); + } + } + } + ] + --%> \ No newline at end of file diff --git a/src/main/webapp/html/systemservicedefinition/view.jsp b/src/main/webapp/html/systemservicedefinition/view.jsp index 53b11b0..75c45a9 100644 --- a/src/main/webapp/html/systemservicedefinition/view.jsp +++ b/src/main/webapp/html/systemservicedefinition/view.jsp @@ -111,6 +111,15 @@ function deleteSSD(){ return; } + <%-- + $('#definitionsTable_processing') + .on( 'processing.dt', function ( e, settings, processing ) { + $('#processingIndicator').css( 'display', processing ? 'block' : 'none' ); + } ) + .dataTable(); --%> + + $('#definitionsTable_processing').css( 'display', 'block'); + var deleteUrl='<%=ssdDeleteURL.toString()%>'; deleteUrl= deleteUrl.replace("clientIdValue",rowSelected["0"]["ClientId"]); deleteUrl= deleteUrl.replace("descriptionValue",rowSelected["0"]["Description"]); @@ -125,7 +134,7 @@ function refreshSSD(){ $.fn.dataTable.ext.buttons.createSSD = { - text: 'add_circle_outline', + text: 'add_circle_outlineCreate', action: function ( e, dt, node, config ) { createSSD(); }, @@ -136,7 +145,7 @@ $.fn.dataTable.ext.buttons.createSSD = { }; $.fn.dataTable.ext.buttons.deleteSSD = { - text: 'remove_circle_outline', + text: 'remove_circle_outlineDelete', action: function ( e, dt, node, config ) { deleteSSD(); }, @@ -147,7 +156,7 @@ $.fn.dataTable.ext.buttons.deleteSSD = { }; $.fn.dataTable.ext.buttons.refreshSSD = { - text: 'refresh', + text: 'refreshRefresh', action: function ( e, dt, node, config ) { refreshSSD(); }, @@ -186,12 +195,14 @@ function mainTable() { 'createSSD','deleteSSD','refreshSSD' ], processing: true, + oLanguage: {sProcessing: "
"}, serverSide: true, searching: true, ordering: true, + "order": [], search: { - return: true + "return": true }, "language": { "emptyTable": "Empty",