From e3d02b4397307ea1da71d0bb9ff8f608eb86ae91 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Mon, 23 Jun 2014 17:43:54 +0200 Subject: [PATCH] feature #2909: Fix resource filters for users --- .../public/js/plugins/provision-tab.js | 45 +++++++++++-------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/src/sunstone/public/js/plugins/provision-tab.js b/src/sunstone/public/js/plugins/provision-tab.js index cc10b64588..c7ce7bb274 100644 --- a/src/sunstone/public/js/plugins/provision-tab.js +++ b/src/sunstone/public/js/plugins/provision-tab.js @@ -1221,7 +1221,7 @@ function provision_list_templates(opts_arg){ ''+ '

'+ opts.title + - ''+ + ''+ ''+ ''+ ''+ @@ -1229,7 +1229,7 @@ function provision_list_templates(opts_arg){ ' '+ //tr("Show List") + '' + - ''+ + ''+ ''+ ''+ ''+ @@ -4195,17 +4195,6 @@ function setup_provision_templates_list(context, opts) { $(".provision_list_templates_search", context).fadeIn(); }); - insertSelectOptions( - ".provision_list_templates_filter", - context, - "User", - (opts.filter_expression ? opts.filter_expression : "-2"), - false, - '', - null, - null, - true); - $(".provision_list_templates_filter", context).on("change", ".resource_list_select", function(){ var filter; if ($(this).val() == "-2"){ @@ -4217,6 +4206,17 @@ function setup_provision_templates_list(context, opts) { provision_templates_datatable.fnFilter( filter, 3 ); }) + insertSelectOptions( + ".provision_list_templates_filter", + context, + "User", + (opts.filter_expression ? opts.filter_expression : "-2"), + false, + '', + null, + null, + true); + context.on("click", ".provision_templates_list_filter_button", function(){ $(".provision_list_templates_filter", context).fadeIn(); return false; @@ -4248,6 +4248,9 @@ function setup_provision_templates_list(context, opts) { }); context.on("click", ".provision_delete_template_button", function(){ + var button = $(this); + button.attr("disabled", "disabled"); + var template_id = $(this).attr("template_id"); var image_id = $(this).attr("image_id"); @@ -4320,6 +4323,9 @@ function setup_provision_templates_list(context, opts) { }); context.on("click", ".provision_chmod_template_button", function(){ + var button = $(this); + button.attr("disabled", "disabled"); + var template_id = $(this).attr("template_id"); var image_id = $(this).attr("image_id"); @@ -4372,6 +4378,9 @@ function setup_provision_templates_list(context, opts) { }); context.on("click", ".provision_unshare_template_button", function(){ + var button = $(this); + button.attr("disabled", "disabled"); + var template_id = $(this).attr("template_id"); var image_id = $(this).attr("image_id"); @@ -4562,7 +4571,7 @@ function setup_info_flow(context) { active: true, refresh: false, create: false, - filter: false, + filter: true, data: vms }); }) @@ -4853,7 +4862,7 @@ function setup_provision_flows_list(context, opts){ }); insertSelectOptions( - ".provision_list_vms_filter", + ".provision_list_flows_filter", context, "User", (opts.filter_expression ? opts.filter_expression : "-2"), @@ -5042,7 +5051,7 @@ function setup_provision_user_info(context) { active: true, refresh: false, create: false, - filter: false, + filter: true, filter_expression: data.ID }); }) @@ -5066,7 +5075,7 @@ function setup_provision_user_info(context) { active: true, refresh: false, create: false, - filter: false, + filter: true, filter_expression: data.ID }); }) @@ -5090,7 +5099,7 @@ function setup_provision_user_info(context) { active: true, refresh: false, create: false, - filter: false, + filter: true, filter_expression: data.ID }); })