From b062783308e74faedb68db059641f2eb6eae6350 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Wed, 20 Jan 2016 18:26:57 +0100 Subject: [PATCH] Use new ResourceSelect in cloud view --- src/sunstone/public/app/tabs/provision-tab.js | 1 - .../app/tabs/provision-tab/flows/list.js | 19 ++++++++----------- .../app/tabs/provision-tab/templates/list.js | 19 ++++++++----------- .../public/app/tabs/provision-tab/vms/list.js | 19 ++++++++----------- 4 files changed, 24 insertions(+), 34 deletions(-) diff --git a/src/sunstone/public/app/tabs/provision-tab.js b/src/sunstone/public/app/tabs/provision-tab.js index 4ed94e6421..99bf22da10 100644 --- a/src/sunstone/public/app/tabs/provision-tab.js +++ b/src/sunstone/public/app/tabs/provision-tab.js @@ -23,7 +23,6 @@ define(function(require) { var OpenNebula = require('opennebula'); var Sunstone = require('sunstone'); var Notifier = require('utils/notifier'); - var ResourceSelect = require('utils/resource-select'); var QuotaWidgets = require('utils/quotas/quota-widgets'); var QuotaDefaults = require('utils/quotas/quota-defaults'); var Accounting = require('utils/accounting'); diff --git a/src/sunstone/public/app/tabs/provision-tab/flows/list.js b/src/sunstone/public/app/tabs/provision-tab/flows/list.js index 35d295a03f..bf480e0e41 100644 --- a/src/sunstone/public/app/tabs/provision-tab/flows/list.js +++ b/src/sunstone/public/app/tabs/provision-tab/flows/list.js @@ -239,17 +239,14 @@ define(function(require) { } }) - ResourceSelect.insert( - ".provision_list_flows_filter", - context, - "User", - (opts.filter_expression ? opts.filter_expression : "-2"), - false, - '', - null, - null, - true, - true); + ResourceSelect.insert({ + context: $('.provision_list_flows_filter', context), + resourceName: 'User', + initValue: (opts.filter_expression ? opts.filter_expression : "-2"), + extraOptions: '', + triggerChange: true, + onlyName: true + }); context.on("click", ".provision_flows_list_filter_button", function(){ $(".provision_list_flows_filter", context).fadeIn(); diff --git a/src/sunstone/public/app/tabs/provision-tab/templates/list.js b/src/sunstone/public/app/tabs/provision-tab/templates/list.js index 96d0ae80a2..9d6b65e535 100644 --- a/src/sunstone/public/app/tabs/provision-tab/templates/list.js +++ b/src/sunstone/public/app/tabs/provision-tab/templates/list.js @@ -218,17 +218,14 @@ define(function(require) { } }) - ResourceSelect.insert( - ".provision_list_templates_filter", - context, - "User", - (opts.filter_expression ? opts.filter_expression : "-2"), - false, - '', - null, - null, - true, - true); + ResourceSelect.insert({ + context: $('.provision_list_templates_filter', context), + resourceName: 'User', + initValue: (opts.filter_expression ? opts.filter_expression : "-2"), + extraOptions: '', + triggerChange: true, + onlyName: true + }); context.on("click", ".provision_templates_list_filter_button", function(){ $(".provision_list_templates_filter", context).fadeIn(); diff --git a/src/sunstone/public/app/tabs/provision-tab/vms/list.js b/src/sunstone/public/app/tabs/provision-tab/vms/list.js index c55d7acf96..289f8334ca 100644 --- a/src/sunstone/public/app/tabs/provision-tab/vms/list.js +++ b/src/sunstone/public/app/tabs/provision-tab/vms/list.js @@ -213,17 +213,14 @@ define(function(require) { } }) - ResourceSelect.insert( - ".provision_list_vms_filter", - context, - "User", - (opts.filter_expression ? opts.filter_expression : "-2"), - false, - '', - null, - null, - true, - true); + ResourceSelect.insert({ + context: $('.provision_list_vms_filter', context), + resourceName: 'User', + initValue: (opts.filter_expression ? opts.filter_expression : "-2"), + extraOptions: '', + triggerChange: true, + onlyName: true + }); context.on("click", ".provision_vms_list_filter_button", function(){ $(".provision_list_vms_filter", context).fadeIn();