forked from microsoft/PowerBI-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
54 lines (44 loc) · 1.28 KB
/
Copy pathindex.js
File metadata and controls
54 lines (44 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
var sampleContentLoaded = false;
var documentationContentLoaded = false;
var anyReportSectionLoaded = false;
$(function() {
OpenSampleSection();
});
function OpenSampleSection() {
OpenEmbedWorkspace("#top-sample", "step_authorize.html");
}
function OpenAnyReportSection() {
OpenEmbedWorkspace("#top-anyReport", "anyReport.html");
}
function OpenEmbedWorkspace(activeTabSelector, authStepHtml)
{
// Any report, uses the same settings as sample report. ony changes the auth step.
if (!sampleContentLoaded)
{
// Open Report Sample.
$("#sampleContent").load("sample.html", function() {
$("#mainContent").load("report.html");
sampleContentLoaded = true;
});
}
$("#authorize-step-wrapper").load(authStepHtml);
SetActiveStyle(activeTabSelector);
$(".content").hide();
$("#sampleContent").show();
OpenAuthStep();
}
function OpenDocumentationSection() {
if (!documentationContentLoaded)
{
$("#documentationContent").load("docs.html");
documentationContentLoaded = true;
}
SetActiveStyle("#top-docs");
$(".content").hide();
$("#documentationContent").show();
}
function SetActiveStyle(id)
{
$("#top-ul li").removeClass("top-li-active");
$(id).addClass("top-li-active");
}