mirror of https://github.com/apache/cloudstack.git
cloudstack UI - advanced search - extend listView widget to pass data on Advanced Search Dialog to data provider.
This commit is contained in:
parent
ef48250bd9
commit
d09b46751c
|
|
@ -271,8 +271,13 @@
|
|||
|
||||
dataProvider: function(args) {
|
||||
var array1 = [];
|
||||
if(args.filterBy != null) {
|
||||
if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) {
|
||||
if(args.filterBy != null) {
|
||||
if(args.filterBy.advSearch != null && typeof(args.filterBy.advSearch) == "object") {
|
||||
for(var key in args.filterBy.advSearch) {
|
||||
array1.push("&" + key + "=" + args.filterBy.advSearch[key]);
|
||||
}
|
||||
}
|
||||
else if(args.filterBy.search != null && args.filterBy.search.by != null && args.filterBy.search.value != null) {
|
||||
switch(args.filterBy.search.by) {
|
||||
case "name":
|
||||
if(args.filterBy.search.value.length > 0)
|
||||
|
|
|
|||
|
|
@ -1368,7 +1368,7 @@
|
|||
|
||||
//advanced search
|
||||
var advancedSearch = function(args) {
|
||||
page = 1;
|
||||
page = 1;
|
||||
loadBody(
|
||||
$table,
|
||||
listViewData.dataProvider,
|
||||
|
|
@ -1379,10 +1379,7 @@
|
|||
page: page,
|
||||
filterBy: {
|
||||
kind: $listView.find('select[id=filterBy]').val(),
|
||||
search: {
|
||||
value: args.data.name,
|
||||
by: 'name'
|
||||
}
|
||||
advSearch: args.data
|
||||
}
|
||||
},
|
||||
listViewData.actions,
|
||||
|
|
|
|||
Loading…
Reference in New Issue