Skip to content

18 files changed

+294
-352
lines changed

demo/v2-demo/anyReport.html

Lines changed: 0 additions & 52 deletions
This file was deleted.

demo/v2-demo/code_area.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<button id="btnRunCode" class="textAreaControl">
55
<img src="images\run.png" /> Run
66
</button>
7-
<button id="btnCopyCode" class="textAreaControl" onclick="CopyCode();">
7+
<button id="btnCopyCode" class="textAreaControl" onclick="elementClicked(this);CopyCode();">
88
<img src="images\copy.png" /> Copy
99
</button>
1010
</div>

demo/v2-demo/docs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ <h2>Videos</h2>
3030
<iframe width="330" height="186" src="https://www.youtube.com/embed/NbsLRDMWNRI" frameborder="0" allow="encrypted-media" allowfullscreen></iframe>
3131
</div>
3232
<div class="docs-video">
33-
Get an embed token<br>
33+
Get an Embed Token & Embed Your Analytics<br>
3434
<iframe width="330" height="186" src="https://www.youtube.com/embed/GPHHdDRSlis" frameborder="0" allow="encrypted-media" allowfullscreen></iframe>
3535
</div>
3636
<div class="docs-video">

demo/v2-demo/index.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@
4646

4747
<div id ="documentationContent" class="content">
4848
</div>
49-
50-
<div id ="anyReportContent" class="content">
51-
</div>
5249
</div>
5350
</div>
5451

demo/v2-demo/log_window.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<div id="response" class="responseDiv">
22
<div class="editorTitle">Log</div>
33
<div class="textAreaControls">
4-
<button id="btnCopyResponse" class="textAreaControl" onclick="CopyResponseWindow();">
4+
<button id="btnCopyResponse" class="textAreaControl" onclick="elementClicked(this);CopyResponseWindow();">
55
<img src="images\copy.png"/> Copy
66
</button>
7-
<button id="btnClearResponse" class="textAreaControl" onclick="ClearTextArea('#txtResponse');">
7+
<button id="btnClearResponse" class="textAreaControl" onclick="elementClicked(this);ClearTextArea('#txtResponse');">
88
<img src="images\clear.png"/> Clear
99
</button>
1010
</div>

demo/v2-demo/report.html

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
<div><a href="#">Embed</a></div>
1111
</li>
1212
<li id="interact-tab" onclick="OpenInteractTab();">
13-
<div><a href="#">Interact</a></div>
13+
<div class="interactTooltip">
14+
<div><a href="#">Interact</a></div>
15+
<span class="tooltipText">Please click 'Run' before switching to 'Interact' tab</span>
16+
</div>
1417
</li>
1518
</ul>
1619
</div>
@@ -26,10 +29,10 @@
2629
<div class="editorTitleText">Embedded view</div>
2730
</div>
2831
<div class="textAreaControls">
29-
<button id="btnDesktopView" class="textAreaControl wide" onclick="EmbedAreaDesktopView();">
32+
<button id="btnDesktopView" class="textAreaControl wide" onclick="elementClicked(this);EmbedAreaDesktopView();">
3033
<img src="images\pc.png"/> Desktop
3134
</button>
32-
<button id="btnPhoneView" class="textAreaControl narrow" onclick="EmbedAreaMobileView();">
35+
<button id="btnPhoneView" class="textAreaControl narrow" onclick="elementClicked(this);EmbedAreaMobileView();">
3336
<img src="images\phone.png"/> Phone
3437
</button>
3538
</div>
@@ -67,11 +70,11 @@
6770

6871
LoadLogWindow("#logWindow");
6972

70-
var modeUrlParam = GetParameterByName("mode");
71-
var mode = modeUrlParam ? modeUrlParam : "view";
73+
const modeUrlParam = GetParameterByName("mode");
74+
const mode = modeUrlParam ? modeUrlParam : "view";
7275

73-
var entityTypeUrlParam = GetParameterByName("entityType");
74-
var entityType;
76+
const entityTypeUrlParam = GetParameterByName("entityType");
77+
let entityType;
7578
if (entityTypeUrlParam == "dashboard") {
7679
entityType = EntityType.Dashboard;
7780
} else if (entityTypeUrlParam == "tile") {

demo/v2-demo/scripts/function_mapping.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ function datasetNotSupported() {
2626
}
2727

2828
function IsSaveMock(funcName) {
29-
var sampleId = GetSession(SessionKeys.SampleId);
30-
var isSample = sampleId && (_session.embedId === sampleId);
29+
const sampleId = GetSession(SessionKeys.SampleId);
30+
const isSample = sampleId && (_session.embedId === sampleId);
3131
return ((funcName === '_Report_save' || funcName === '_Report_saveAs') && isSample);
3232
}
3333

3434
function IsBasicMock(funcName) {
35-
var sampleId = GetSession(SessionKeys.SampleId);
36-
var isSample = sampleId && (_session.embedId === sampleId);
35+
const sampleId = GetSession(SessionKeys.SampleId);
36+
const isSample = sampleId && (_session.embedId === sampleId);
3737
return ((funcName === '_Embed_BasicEmbed' || funcName === '_Embed_BasicEmbed_EditMode') && isSample);
3838
}
3939

4040
function IsCreateMock(funcName) {
41-
var sampleId = GetSession(SessionKeys.SampleId);
42-
var isSample = sampleId && (_session.embedId === sampleId);
41+
const sampleId = GetSession(SessionKeys.SampleId);
42+
const isSample = sampleId && (_session.embedId === sampleId);
4343
return (funcName === '_Embed_Create' && isSample);
4444
}
4545

@@ -54,13 +54,13 @@ function IsNotSupported(funcName) {
5454
}
5555

5656
// Get a reference to the embedded element
57-
var container = '#embedContainer';
58-
var embed = powerbi.get($(container)[0]);
57+
const container = '#embedContainer';
58+
let embed = powerbi.get($(container)[0]);
5959
if (embed.config.type !== 'create') {
6060
return false;
6161
}
6262

63-
var runFunc = mockDict[funcName];
63+
const runFunc = mockDict[funcName];
6464
return (runFunc && runFunc === datasetNotSupported) ? true : false;
6565
}
6666

@@ -69,12 +69,12 @@ function IsMock(funcName) {
6969
}
7070

7171
function mapFunc(func) {
72-
var funcName = getFuncName(func);
72+
const funcName = getFuncName(func);
7373
return IsMock(funcName) ? mockDict[funcName] : func;
7474
}
7575

7676
function getFuncName(func) {
77-
var funcName = func.name;
77+
let funcName = func.name;
7878

7979
if (!funcName)
8080
{

demo/v2-demo/scripts/index.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
var sampleContentLoaded = false;
22
var documentationContentLoaded = false;
33
var demosContentLoaded = false;
4-
var anyReportSectionLoaded = false;
54

65
$(function() {
76
OpenSampleSection();
@@ -12,13 +11,8 @@ function OpenSampleSection() {
1211
OpenEmbedWorkspace("#main-sample", "step_samples.html");
1312
}
1413

15-
function OpenAnyReportSection() {
16-
OpenEmbedWorkspace("#main-anyReport", "anyReport.html");
17-
}
18-
19-
function OpenEmbedWorkspace(activeTabSelector, authStepHtml)
14+
function OpenEmbedWorkspace(activeTabSelector, samplesStepHtml)
2015
{
21-
// Any report, uses the same settings as sample report. ony changes the auth step.
2216
if (!sampleContentLoaded)
2317
{
2418
// Open Report Sample.
@@ -28,7 +22,7 @@ function OpenEmbedWorkspace(activeTabSelector, authStepHtml)
2822
});
2923
}
3024

31-
$("#samples-step-wrapper").load(authStepHtml);
25+
$("#samples-step-wrapper").load(samplesStepHtml);
3226
SetActiveStyle(activeTabSelector);
3327

3428
$(".content").hide();

demo/v2-demo/scripts/logger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function InitLogger(divId) {
77
};
88

99
Logger.logText = function name(text) {
10-
var textbox = document.getElementById(divId);
10+
let textbox = document.getElementById(divId);
1111

1212
if (!textbox.value)
1313
{

0 commit comments

Comments
 (0)