diff --git a/src/sunstone/public/js/plugins/oneflow-services.js b/src/sunstone/public/js/plugins/oneflow-services.js index d08a79bc51..662a731979 100644 --- a/src/sunstone/public/js/plugins/oneflow-services.js +++ b/src/sunstone/public/js/plugins/oneflow-services.js @@ -897,7 +897,17 @@ var service_actions = { "Service.show" : { type : "single", call: Service.show, - callback: updateServiceElement, + callback: function(request, response){ + var tab = dataTable_services.parents(".tab"); + + if (Sunstone.rightInfoVisible(tab)) { + // individual view + updateServiceInfo(request, response); + } + + // datatable row + updateServiceElement(request, response); + }, error: onError }, @@ -925,7 +935,7 @@ var service_actions = { }); } - Sunstone.runAction("Service.showinfo", Sunstone.rightInfoResourceId(tab)) + Sunstone.runAction("Service.show", Sunstone.rightInfoResourceId(tab)) } else { waitingNodes(dataTable_services); Sunstone.runAction("Service.list"); @@ -1739,7 +1749,7 @@ $(document).ready(function(){ initCheckAllBoxes(dataTable_services); tableCheckboxesListener(dataTable_services); - infoListener(dataTable_services,'Service.showinfo'); + infoListener(dataTable_services,'Service.show'); dataTable_services.fnSort( [ [1,config['user_config']['table_order']] ] ); } }); diff --git a/src/sunstone/public/js/plugins/oneflow-templates.js b/src/sunstone/public/js/plugins/oneflow-templates.js index ce01c189dc..7388435d7a 100644 --- a/src/sunstone/public/js/plugins/oneflow-templates.js +++ b/src/sunstone/public/js/plugins/oneflow-templates.js @@ -363,7 +363,17 @@ var service_template_actions = { "ServiceTemplate.show" : { type : "single", call: ServiceTemplate.show, - callback: updateServiceTemplateElement, + callback: function(request, response){ + var tab = dataTable_service_templates.parents(".tab"); + + if (Sunstone.rightInfoVisible(tab)) { + // individual view + updateServiceTemplateInfo(request, response); + } + + // datatable row + updateServiceTemplateElement(request, response); + }, error: onError }, @@ -387,7 +397,7 @@ var service_template_actions = { call: function () { var tab = dataTable_service_templates.parents(".tab"); if (Sunstone.rightInfoVisible(tab)) { - Sunstone.runAction("ServiceTemplate.showinfo", Sunstone.rightInfoResourceId(tab)) + Sunstone.runAction("ServiceTemplate.show", Sunstone.rightInfoResourceId(tab)) } else { waitingNodes(dataTable_service_templates); Sunstone.runAction("ServiceTemplate.list"); @@ -667,12 +677,6 @@ function updateServiceTemplateInfo(request,elem){ setPermissionsTable(elem_info,''); - $("#service_template_info_panel_refresh", $("#service_template_info_panel")).click(function(){ - $(this).html(spinner); - selected_row_template_role_id = $($('td.markrowselected',serviceTemplaterolesDataTable.fnGetNodes())[1]).html(); - Sunstone.runAction('ServiceTemplate.showinfo', elem_info.ID); - }) - var roles = elem_info.TEMPLATE.BODY.roles if (roles && roles.length) { serviceTemplaterolesDataTable = $('#datatable_service_template_roles').dataTable({ @@ -1114,7 +1118,7 @@ function setupCreateServiceTemplateDialog(){ }); $('#create_service_template_reset', dialog).click(function(){ - dialog.remove(); + dialog.html(""); setupCreateServiceTemplateDialog(); popUpCreateServiceTemplateDialog(); @@ -1438,7 +1442,7 @@ $(document).ready(function(){ initCheckAllBoxes(dataTable_service_templates); tableCheckboxesListener(dataTable_service_templates); - infoListener(dataTable_service_templates,'ServiceTemplate.showinfo'); + infoListener(dataTable_service_templates,'ServiceTemplate.show'); $('div#service_templates_tab div.legend_div').hide();