From 4b5ce41d5a33e0ede63826fefa457e04ddacde8b Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Wed, 24 Apr 2013 19:26:15 +0200 Subject: [PATCH] Do not auto refresh data table if a resource is selected or a filter is defined --- src/sunstone/public/js/plugins/acls-tab.js | 2 +- src/sunstone/public/js/plugins/clusters-tab.js | 2 +- src/sunstone/public/js/plugins/datastores-tab.js | 2 +- src/sunstone/public/js/plugins/files-tab.js | 2 +- src/sunstone/public/js/plugins/groups-tab.js | 2 +- src/sunstone/public/js/plugins/hosts-tab.js | 2 +- src/sunstone/public/js/plugins/images-tab.js | 2 +- src/sunstone/public/js/plugins/templates-tab.js | 2 +- src/sunstone/public/js/plugins/users-tab.js | 2 +- src/sunstone/public/js/plugins/vms-tab.js | 2 +- src/sunstone/public/js/plugins/vnets-tab.js | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/sunstone/public/js/plugins/acls-tab.js b/src/sunstone/public/js/plugins/acls-tab.js index df331fb618..e3cceae746 100644 --- a/src/sunstone/public/js/plugins/acls-tab.js +++ b/src/sunstone/public/js/plugins/acls-tab.js @@ -603,7 +603,7 @@ function setAclAutorefresh(){ setInterval(function(){ var checked = $('input.check_item:checked',dataTable_acls); var filter = $('#acl_search').attr('value'); - if (!checked.length && !filter.length){ + if ((checked.length==0) && !filter){ Sunstone.runAction("Acl.autorefresh"); } },INTERVAL+someTime()); diff --git a/src/sunstone/public/js/plugins/clusters-tab.js b/src/sunstone/public/js/plugins/clusters-tab.js index 82eff4d4c4..2c7c672b9e 100644 --- a/src/sunstone/public/js/plugins/clusters-tab.js +++ b/src/sunstone/public/js/plugins/clusters-tab.js @@ -1793,7 +1793,7 @@ function setClusterAutorefresh() { var checked = $('input.check_item:checked',dataTable_clusters); var filter = $("#cluster_search").attr('value'); - if (!checked.length && !filter.length && !inSubMenu){ + if ((checked.length==0) && !filter){ Sunstone.runAction("Cluster.autorefresh"); } },INTERVAL+someTime()); diff --git a/src/sunstone/public/js/plugins/datastores-tab.js b/src/sunstone/public/js/plugins/datastores-tab.js index 3a61b5e790..2b8a8fab36 100644 --- a/src/sunstone/public/js/plugins/datastores-tab.js +++ b/src/sunstone/public/js/plugins/datastores-tab.js @@ -1068,7 +1068,7 @@ function setDatastoreAutorefresh(){ setInterval(function(){ var checked = $('input.check_item:checked',dataTable_datastores); var filter = $("#datastore_search").attr('value'); - if (!checked.length && !filter.length){ + if ((checked.length==0) && !filter){ Sunstone.runAction("Datastore.autorefresh"); }; },INTERVAL+someTime()); diff --git a/src/sunstone/public/js/plugins/files-tab.js b/src/sunstone/public/js/plugins/files-tab.js index 04a9c485f8..417e2ea4dd 100644 --- a/src/sunstone/public/js/plugins/files-tab.js +++ b/src/sunstone/public/js/plugins/files-tab.js @@ -946,7 +946,7 @@ function setFileAutorefresh() { setInterval(function(){ var checked = $('input.check_item:checked',dataTable_files); var filter = $("#file_search").attr('value'); - if (!checked.length && !filter.length){ + if ((checked.length==0) && !filter){ Sunstone.runAction("File.autorefresh"); } },INTERVAL+someTime()); diff --git a/src/sunstone/public/js/plugins/groups-tab.js b/src/sunstone/public/js/plugins/groups-tab.js index 8e685d4a5c..f454e3d867 100644 --- a/src/sunstone/public/js/plugins/groups-tab.js +++ b/src/sunstone/public/js/plugins/groups-tab.js @@ -610,7 +610,7 @@ function setGroupAutorefresh(){ setInterval(function(){ var checked = $('input.check_item:checked',dataTable_groups); var filter = $("#group_search").attr('value'); - if (!checked.length && !filter.length){ + if ((checked.length==0) && !filter){ Sunstone.runAction("Group.autorefresh"); } },INTERVAL+someTime()); diff --git a/src/sunstone/public/js/plugins/hosts-tab.js b/src/sunstone/public/js/plugins/hosts-tab.js index 30cf6b0f59..20821ef210 100644 --- a/src/sunstone/public/js/plugins/hosts-tab.js +++ b/src/sunstone/public/js/plugins/hosts-tab.js @@ -1119,7 +1119,7 @@ function setHostAutorefresh() { setInterval(function(){ var checked = $('input.check_item:checked',dataTable_hosts); var filter = $("#hosts_search").attr('value'); - if (!checked.length && !filter.length){ + if ((checked.length==0) && !filter){ Sunstone.runAction("Host.autorefresh"); } },INTERVAL+someTime()); diff --git a/src/sunstone/public/js/plugins/images-tab.js b/src/sunstone/public/js/plugins/images-tab.js index d10773da54..76ea59983d 100644 --- a/src/sunstone/public/js/plugins/images-tab.js +++ b/src/sunstone/public/js/plugins/images-tab.js @@ -1156,7 +1156,7 @@ function setImageAutorefresh() { setInterval(function(){ var checked = $('input.check_item:checked',dataTable_images); var filter = $("#image_search").attr('value'); - if (!checked.length && !filter.length){ + if ((checked.length==0) && !filter){ Sunstone.runAction("Image.autorefresh"); } },INTERVAL+someTime()); diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index 409b7a1bd3..498688ad86 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -4404,7 +4404,7 @@ function setTemplateAutorefresh() { setInterval(function(){ var checked = $('input.check_item:checked',dataTable_templates); var filter = $("#template_search").attr('value'); - if (!checked.length && !filter.length){ + if ((checked.length==0) && !filter){ Sunstone.runAction("Template.autorefresh"); } },INTERVAL+someTime()); diff --git a/src/sunstone/public/js/plugins/users-tab.js b/src/sunstone/public/js/plugins/users-tab.js index 32227a9625..f426b9feb8 100644 --- a/src/sunstone/public/js/plugins/users-tab.js +++ b/src/sunstone/public/js/plugins/users-tab.js @@ -887,7 +887,7 @@ function setUserAutorefresh(){ setInterval(function(){ var checked = $('input.check_item:checked',dataTable_users); var filter = $("#user_search").attr('value'); - if (!checked.length && !filter.length){ + if ((checked.length==0) && !filter){ Sunstone.runAction("User.autorefresh"); } },INTERVAL+someTime()); diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js index 02f2882399..cf5350517e 100644 --- a/src/sunstone/public/js/plugins/vms-tab.js +++ b/src/sunstone/public/js/plugins/vms-tab.js @@ -2997,7 +2997,7 @@ function setVMAutorefresh(){ setInterval(function(){ var checked = $('input.check_item:checked',dataTable_vMachines); var filter = $("#vms_search").attr('value'); - if (!checked.length && !filter.length){ + if ((checked.length==0) && !filter){ Sunstone.runAction("VM.autorefresh"); }; },INTERVAL+someTime()); diff --git a/src/sunstone/public/js/plugins/vnets-tab.js b/src/sunstone/public/js/plugins/vnets-tab.js index 96468b4841..104e0b0b80 100644 --- a/src/sunstone/public/js/plugins/vnets-tab.js +++ b/src/sunstone/public/js/plugins/vnets-tab.js @@ -1337,7 +1337,7 @@ function setVNetAutorefresh() { setInterval(function(){ var checked = $('input.check_item:checked',dataTable_vNetworks); var filter = $("#vnet_search").attr('value'); - if (!checked.length && !filter.length){ + if ((checked.length==0) && !filter){ Sunstone.runAction("Network.autorefresh"); } },INTERVAL+someTime());