cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject git commit: updated refs/heads/master to 75cd79a
Date Wed, 10 Sep 2014 10:07:51 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 91fd8d7cd -> 75cd79a23


CLOUDSTACK-7520: [UI] keep advanced search parameters visible after search has been run.

- Preserve the advanced search parameters, so that when the advanced search box is shown again,
it is populated with the values selected/entered previously, unless they have navigated away
from the search results page,
or applied any additional filters/search parameters.

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/75cd79a2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/75cd79a2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/75cd79a2

Branch: refs/heads/master
Commit: 75cd79a2382486385b5ae901c5b5c45cbd1505fc
Parents: 91fd8d7
Author: Mihaela Stoica <mihaela.stoica@citrix.com>
Authored: Tue Sep 9 14:44:31 2014 +0100
Committer: Rajani Karuturi <rajanikaruturi@gmail.com>
Committed: Wed Sep 10 15:37:35 2014 +0530

----------------------------------------------------------------------
 ui/scripts/ui/widgets/listView.js | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/75cd79a2/ui/scripts/ui/widgets/listView.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/widgets/listView.js b/ui/scripts/ui/widgets/listView.js
index 22182c1..c7b4a4d 100644
--- a/ui/scripts/ui/widgets/listView.js
+++ b/ui/scripts/ui/widgets/listView.js
@@ -1854,6 +1854,7 @@
         //basic search
         var basicSearch = function() {
             $listView.removeData('advSearch');
+            advancedSearchData = {};
 
             $listView.data('page', 1);
             loadBody(
@@ -1930,6 +1931,8 @@
             );
         };
 
+        var advancedSearchData = {};
+
         var closeAdvancedSearch = function() {
             $listView.find('.advanced-search .form-container:visible').remove();
         };
@@ -1941,6 +1944,11 @@
                 return false;
             }
 
+            // Setup advanced search default values, when existing data is present
+            $.each(listViewData.advSearchFields, function(fieldID, field) {
+                field.defaultValue = advancedSearchData[fieldID];
+            });
+
             var form = cloudStack.dialog.createForm({
                 noDialog: true,
                 form: {
@@ -1949,6 +1957,7 @@
                 },
                 after: function(args) {
                     advancedSearch(args);
+                    advancedSearchData = args.data;
                     $listView.find('.button.search#basic_search').siblings('.search-bar').find('input').val('');
//clear basic search input field to avoid confusion of search result
                     closeAdvancedSearch();
                 }


Mime
View raw message