Skip to content

Commit

Permalink
janodvarko#11 fix detail tab and roots tab no scroll bar issue
Browse files Browse the repository at this point in the history
  • Loading branch information
crackevil committed Feb 26, 2016
1 parent 1d9e74d commit ca07b3d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
7 changes: 4 additions & 3 deletions content/tabs/detailsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,23 @@ DetailsTab.prototype = Lib.extend(DynamicTab.prototype,
label: "Details",

bodyTag:
DIV({"class": "DetailsBody"}),
DIV({"class": "tabContent"}),

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Content

onUpdateBody: function(tabView, body)
{
var content = this.getTabContent();
var selection = tabView.selection;
if (!selection)
{
this.noSelection.replace({}, body);
this.noSelection.replace({}, content);
return;
}

var tree = new ObjectTree({"Object": selection});
tree.append(body, true);
tree.append(content, true);
},
});

Expand Down
19 changes: 10 additions & 9 deletions content/tabs/rootsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ define([
"lib/domplate",
"lib/lib",
"lib/trace",
"lib/tabView",
"tabs/dynamicTab",
"app/objectTableView",
],

function(Domplate, Lib, FBTrace, TabView, ObjectTableView) {
function(Domplate, Lib, FBTrace, dynamicTab, ObjectTableView) {
with (Domplate) {

// ********************************************************************************************* //
// Home Tab

function RootsTab() {}
RootsTab.prototype = Lib.extend(TabView.Tab.prototype,
RootsTab.prototype = Lib.extend(dynamicTab.prototype,
{
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Tab
Expand All @@ -24,7 +24,7 @@ RootsTab.prototype = Lib.extend(TabView.Tab.prototype,
label: "Roots",

bodyTag:
DIV({"class": "RootsBody"}),
DIV({"class": "tabContent"}),

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Content
Expand All @@ -37,21 +37,22 @@ RootsTab.prototype = Lib.extend(TabView.Tab.prototype,

invalidate: function()
{
TabView.Tab.prototype.invalidate.apply(this, arguments);
dynamicTab.prototype.invalidate.apply(this, arguments);
},

onUpdateBody: function(tabView, body)
{
var content = this.getTabContent();
if (tabView.analyzer.isEmpty())
{
this.noAnalyses.replace({}, body);
this.noAnalyses.replace({}, content);
return;
}

var selection = tabView.selection;
if (!selection)
{
this.noSelection.replace({}, body);
this.noSelection.replace({}, content);
return;
}

Expand All @@ -60,11 +61,11 @@ RootsTab.prototype = Lib.extend(TabView.Tab.prototype,
if (results.length)
{
var table = new ObjectTableView();
table.render(body, results);
table.render(content, results);
}
else
{
this.noRoots.replace({}, body);
this.noRoots.replace({}, content);
}
},
});
Expand Down

0 comments on commit ca07b3d

Please sign in to comment.