mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
Feature #3748: tab-datatable does not include items when elementArray returns false
This commit is contained in:
parent
c640b69451
commit
1f9ab1cc8d
@ -79,38 +79,6 @@ define(function(require) {
|
||||
|
||||
return Table;
|
||||
|
||||
// TODO Check if update_fn must be overwritten
|
||||
/*
|
||||
"update_fn": function(datatable){
|
||||
OpenNebula.Image.list({
|
||||
timeout: true,
|
||||
success: function (request, resource_list){
|
||||
var list_array = [];
|
||||
|
||||
$.each(resource_list,function(){
|
||||
var image = this.IMAGE;
|
||||
|
||||
// KERNEL || RAMDISK || CONTEXT
|
||||
var add = ( image.TYPE != "3" &&
|
||||
image.TYPE != "4" &&
|
||||
image.TYPE != "5" )
|
||||
|
||||
if(add && opts.filter_fn){
|
||||
add = opts.filter_fn(this.IMAGE);
|
||||
}
|
||||
|
||||
if(add){
|
||||
list_array.push(imageElementArray(this));
|
||||
}
|
||||
});
|
||||
|
||||
updateView(list_array, datatable);
|
||||
},
|
||||
error: onError
|
||||
});
|
||||
},
|
||||
*/
|
||||
|
||||
/*
|
||||
FUNCTION DEFINITIONS
|
||||
*/
|
||||
|
@ -78,38 +78,6 @@ define(function(require) {
|
||||
|
||||
return Table;
|
||||
|
||||
// TODO Check if update_fn must be overwritten
|
||||
/*
|
||||
"update_fn": function(datatable){
|
||||
OpenNebula.Image.list({
|
||||
timeout: true,
|
||||
success: function (request, resource_list){
|
||||
var list_array = [];
|
||||
|
||||
$.each(resource_list,function(){
|
||||
var image = this.IMAGE;
|
||||
|
||||
// KERNEL || RAMDISK || CONTEXT
|
||||
var add = ( image.TYPE != "3" &&
|
||||
image.TYPE != "4" &&
|
||||
image.TYPE != "5" )
|
||||
|
||||
if(add && opts.filter_fn){
|
||||
add = opts.filter_fn(this.IMAGE);
|
||||
}
|
||||
|
||||
if(add){
|
||||
list_array.push(imageElementArray(this));
|
||||
}
|
||||
});
|
||||
|
||||
updateView(list_array, datatable);
|
||||
},
|
||||
error: onError
|
||||
});
|
||||
},
|
||||
*/
|
||||
|
||||
/*
|
||||
FUNCTION DEFINITIONS
|
||||
*/
|
||||
|
@ -868,9 +868,14 @@ define(function(require) {
|
||||
add = (add && fixed_ids_map[this[that.xmlRoot].ID]);
|
||||
}
|
||||
|
||||
if (add) {
|
||||
var elementArray = that.elementArray(this);
|
||||
var elementArray;
|
||||
|
||||
if (add) {
|
||||
elementArray = that.elementArray(this);
|
||||
add = (elementArray != false);
|
||||
}
|
||||
|
||||
if (add) {
|
||||
if (that.selectOptions.starred_ids != undefined){
|
||||
if (that.selectOptions.starred_ids_map[this[that.xmlRoot].ID]){
|
||||
elementArray[that.selectOptions.name_index] =
|
||||
|
Loading…
x
Reference in New Issue
Block a user