Skip to content

Add Insights to action and Themes showcases #351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"fetch": "^1.0.0",
"http-server": "^0.10.0",
"jquery": "^3.1.0",
"powerbi-client": "^2.6.6",
"powerbi-client": "^2.6.9",
"syntaxhighlighter": "4.0.1"
},
"devDependencies": {}
Expand Down
Binary file added demo/v2-demo/images/closeWhite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
87 changes: 87 additions & 0 deletions demo/v2-demo/images/insightToActionIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions demo/v2-demo/images/themesIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions demo/v2-demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@

<script src="live_showcases/custom_layout/showcase_custom_layout.js"></script>
<script src="live_showcases/bookmarks/showcase_bookmarks.js"></script>
<script src="live_showcases/themes/showcase_themes.js"></script>
<script src="live_showcases/insight_to_action/showcase_insight_to_action.js"></script>

</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h3>Capture & share bookmarks</h3>
</div>

<div id="showcaseContent">
<div id="bookmarksArea">
<div id="leftShowcaseWindow">
<div class="editorTitle">Bookmarks</div>
<div id="bookmarksWrapper">
<div id="bookmarksList">
Expand Down
8 changes: 4 additions & 4 deletions demo/v2-demo/live_showcases/bookmarks/showcase_bookmarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function embedBookmarksReport() {
// Get report Id from session
var embedReportId = GetSession(SessionKeys.EmbedId);

// We give the user View permissions
// Use View permissions
var permissions = models.Permissions.View;

// Embed configuration used to describe the what and how to embed
Expand Down Expand Up @@ -85,7 +85,7 @@ function embedSharedBookmark(enableFilterPane, bookmarkState) {
// Get report Id from session
var embedReportId = GetSession(SessionKeys.EmbedId);

// We give the user View permissions
// Use View permissions
var permissions = models.Permissions.View;

// Get the bookmark name from url param
Expand Down Expand Up @@ -261,7 +261,7 @@ function getBookmarkByID(bookmarkId) {
// Build bookmark radio button HTML element
function buildBookmarkElement(bookmark) {
var labelElement = document.createElement("label");
labelElement.setAttribute("class", "bookmarkContainer");
labelElement.setAttribute("class", "showcaseRadioContainer");

var inputElement = document.createElement("input");
inputElement.setAttribute("type", "radio");
Expand All @@ -271,7 +271,7 @@ function buildBookmarkElement(bookmark) {
labelElement.appendChild(inputElement);

var spanElement = document.createElement("span");
spanElement.setAttribute("class", "bookmarkCheckmark");
spanElement.setAttribute("class", "showcaseRadioCheckmark");
labelElement.appendChild(spanElement);

var secondSpanElement = document.createElement("span");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ <h3>Dynamic report layout</h3>
</div>

<div id="showcaseContent">
<div id="visualsArea">
<div id="leftShowcaseWindow">
<div class="editorTitle">Report visuals (Hide/Show)</div>
<div id="visualsWrapper">
<div id="showcaseItemsWrapper">
<div id="visualsList">
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function embedCustomLayoutReport() {
// Get report Id from session
var embedReportId = GetSession(SessionKeys.EmbedId);

// We give the user View permissions
// Use View permissions
var permissions = models.Permissions.View;

// Embed configuration used to describe the what and how to embed
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<div id="startTooltip">
<div class="btnCloseTooltip" onclick="onTootipClicked('startTooltip');">
<img src="images\closeWhite.png"/>
</div>
<div class="showcaseTooltipText">Start a campaign with these customers</div>
<div class="showcaseTooltipSubText">Hover over the table, and click on the three dots icon '...' at the upper right corner.</div>
<div class="tooltipFooter">
<div class="btnShowcaseTooltip yellowBtn" onclick="onTootipClicked('startTooltip');">
Next
</div>
<div class="tooltipNumber">
1 of 2
</div>
</div>
</div>

<div id="showcases-text">
<h3>Insight to action</h3>
<br>
<div id="showcases-description">
This showcase demonstrates one example of how to leverage the <a href="https://go.microsoft.com/fwlink/?linkid=2063102">‘menu extensions’</a> and <a href="https://go.microsoft.com/fwlink/?linkid=2062683">‘export data’</a> APIs to give users the ability to take meaningful actions within seconds from analytics. The sample contains a basic customer relationship management module. The main table shows a list of customers who have not engaged with your service lately, and might not return. You can send these customers an offer to try and retain them.<br><br>
&nbsp;<b>1. Choose a list of customers</b><br>
<div class="text-tab">
The sales report shows a list of possible churning customers. Use the slicers to define the list of customers you want to engage with.<br><br>
</div>
&nbsp;<b>2. Take actions to get them engaged</b><br>
<div class="text-tab">
Follow the instructions on the tooltips to take actions straight from within the report.<br>
</div>
</div>
<div class="showcases-buttons">
<a class="selectButton floatButton" href="https://go.microsoft.com/fwlink/?linkid=2063102" target="_blank">Documentation</a>
<a class="selectButton floatButton" href="https://go.microsoft.com/fwlink/?linkid=2062950" target="_blank">Get Code</a>
</div>
</div>

<div id="showcaseContent">
<div id="insightToActionShowcaseEmbedArea">
<div class="editorTitle">Embedded view</div>
<div id="showcase-embedded-view">
<div id="embedContainer" class="iframeContainer active"></div>
<div id="dialogMask"></div>
<div id="distributionDialog" class="insightToActionDialog">
<div class="dialogHeader">
<span class="dialogHeaderText">Campaign distribution list</span>
<span id="btnCloseDistributionDialog" onclick="onCloseDialog('distributionDialog');">
<img src="images\close.png"/>
</span>
</div>
<div class="dialogBody">
<div id="dialogTable"></div>
</div>
<div class="dialogFooter">
<div class="insightToActionDialogBtn whiteBtn" onclick="onSendClicked('coupon');">
Send coupon
</div>
<div class="insightToActionDialogBtn whiteBtn" onclick="onSendClicked('discount');">
Send discount
</div>
<div class="insightToActionDialogBtn cancelBtn whiteBtn" onclick="onCloseDialog('distributionDialog');">
Cancel
</div>
</div>
<div id="dialogTooltip">
<div class="btnCloseTooltip" onclick="onTootipClicked('dialogTooltip');">
<img src="images\closeWhite.png"/>
</div>
<div class="showcaseTooltipText">Send offer</div>
<div class="showcaseTooltipSubText">Choose the customers and send them an offering</div>
<div class="tooltipFooter">
<div class="btnShowcaseTooltip yellowBtn" onclick="onTootipClicked('dialogTooltip');">
Got it
</div>
</div>
</div>
</div>
<div id="sendDialog" class="insightToActionDialog">
<div class="dialogHeader">
<span class="dialogHeaderText"></span>
<span id="btnCloseDistributionDialog" onclick="onCloseDialog('sendDialog');">
<img src="images\close.png"/>
</span>
</div>
<div class="dialogBody">
<div class="sendDialogRow">
<div class="sendDialogField">Title</div>
<input type="text" id="title" name="title" value="Special offer just for you" />
</div>
<div class="sendDialogRow">
<div class="sendDialogField">Body</div>
<textarea name="messageBody"></textarea>
</div>
</div>
<div class="dialogFooter">
<div class="insightToActionDialogBtn cancelBtn whiteBtn" onclick="onCloseDialog('sendDialog');">
Cancel
</div>
<div class="insightToActionDialogBtn sendBtn yellowBtn" onclick="onSendDialogSendClicked();">
Send
</div>
</div>
</div>
<div id="messageSent">Sent</div>
</div>
</div>
</div>



<script>
$(document).ready(function() {
embedInsightsToActionReport();
window.addEventListener("resize", setTooltipPosition);
});
</script>
Loading