This commit is contained in:
@@ -157,7 +157,8 @@ export default {
|
||||
"Loading",
|
||||
"AM",
|
||||
"PM",
|
||||
"DataListView"
|
||||
"DataListView",
|
||||
"FilterUnsaved"
|
||||
],
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
@@ -381,11 +381,12 @@ export default {
|
||||
listViewChanged: function() {
|
||||
//console.log("listViewchanged: TOP");
|
||||
var vm = this;
|
||||
//find out if we need to trigger the get data or if it will happen automatically
|
||||
//when we set page to 0
|
||||
//console.log(vm.dataTablePagingOptions.page);
|
||||
//If listview had changed it can only have changed *away* from the unsaved filter item if it's present so just remove that if it exists
|
||||
window.$gz._.remove(vm.pickLists.listViews, function(n) {
|
||||
return n.id == -1;
|
||||
});
|
||||
var ShouldGetData = vm.dataTablePagingOptions.page == 1;
|
||||
|
||||
// vm.pickLists.listViews
|
||||
if (vm.listViewId == 0) {
|
||||
//default view, no saved, no cached
|
||||
vm.listView = undefined;
|
||||
@@ -680,7 +681,13 @@ function populatePickLists(vm) {
|
||||
} else {
|
||||
vm.pickLists.listViews = res.data;
|
||||
window.$gz.form.addNoSelectionItem(vm.pickLists.listViews);
|
||||
//vm.pickLists.availableDataListViews.unshift({ name: "-", id: 0 });
|
||||
//add UNSAVED FILTER if -1
|
||||
if (vm.listViewId == -1) {
|
||||
vm.pickLists.listViews.unshift({
|
||||
name: vm.lt("FilterUnsaved"),
|
||||
id: -1
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user