Infrastructure UI: Fix list views with sub-sections

This commit is contained in:
Brian Federle 2013-06-19 12:24:58 -07:00
parent 0dd14b1c61
commit bd84005b4e
2 changed files with 6 additions and 6 deletions

View File

@ -18,8 +18,9 @@
cloudStack.uiCustom.physicalResources = function(args) {
var listView = function(targetID) {
var target = args.sections.physicalResources.listView[targetID];
var listViewArgs = $.isFunction(target) ? target() : target;
return $('<div>').listView({ listView: $.isFunction(target) ? target() : target });
return $('<div>').listView(listViewArgs.listView ? listViewArgs : { listView: listViewArgs });
};
var $dashboard = $('#template').find('.system-dashboard-view').clone();
var getData = function() {

View File

@ -58,12 +58,11 @@
listView: function(targetID, context) {
return function(args) {
var $elem = args.$panel;
var listViewArgs = cloudStack.sections.system.subsections[targetID].listView;
var listView = cloudStack.sections.system.subsections[targetID];
$elem.listView({
context: context,
listView: listViewArgs
});
$elem.listView($.extend(true, {}, listView, {
context: context
}));
};
},