Add Colors to code
This commit is contained in:
Родитель
32790684d1
Коммит
bfc17b9bd8
|
@ -0,0 +1,16 @@
|
|||
Microsoft.PowerBI.JavaScript
|
||||
|
||||
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
|
||||
Do Not Translate or Localize
|
||||
|
||||
This project incorporates components from the projects listed below. The original copyright notices and the licenses under which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise.
|
||||
|
||||
1. SyntaxHighlighter (https://github.com/syntaxhighlighter/syntaxhighlighter)
|
||||
|
||||
Copyright (c) 2004-2013, Alex Gorbatchev
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -0,0 +1,13 @@
|
|||
Microsoft.PowerBI.JavaScript
|
||||
|
||||
Copyright (c) Microsoft Corporation
|
||||
|
||||
All rights reserved.
|
||||
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -0,0 +1,16 @@
|
|||
Microsoft.PowerBI.JavaScript
|
||||
|
||||
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
|
||||
Do Not Translate or Localize
|
||||
|
||||
This project incorporates components from the projects listed below. The original copyright notices and the licenses under which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise.
|
||||
|
||||
1. SyntaxHighlighter (https://github.com/syntaxhighlighter/syntaxhighlighter)
|
||||
|
||||
Copyright (c) 2004-2013, Alex Gorbatchev
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -2,10 +2,12 @@
|
|||
<div class="editorTitle">Code</div>
|
||||
<div class="textAreaControls">
|
||||
<button id="btnRunCode" class="textAreaControl">
|
||||
<img src="images\run.png"/> Run
|
||||
<img src="images\run.png" /> Run
|
||||
</button>
|
||||
<button id="btnCopyCode" class="textAreaControl" onclick="CopyCode();">
|
||||
<img src="images\copy.png"/> Copy
|
||||
<img src="images\copy.png" /> Copy
|
||||
</button>
|
||||
</div>
|
||||
<textarea id="txtCode" readonly />
|
||||
|
||||
<div id="highlighter">
|
||||
</div>
|
|
@ -6,8 +6,11 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css" />
|
||||
<link type="text/css" rel="stylesheet" href="syntaxhighlighter/theme.css">
|
||||
<link rel="stylesheet" type="text/css" href="style/style.css">
|
||||
<link rel="stylesheet" type="text/css" href="style/layout.css">
|
||||
<link rel="stylesheet" type="text/css" href="style/syntaxHighlighterOverride.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -47,7 +50,7 @@
|
|||
<script src="../node_modules/jquery/dist/jquery.js"></script>
|
||||
<script src="../node_modules/es6-promise/dist/es6-promise.js"></script>
|
||||
<script src="../node_modules/powerbi-client/dist/powerbi.js"></script>
|
||||
|
||||
|
||||
<script src="scripts/codesamples.js"></script>
|
||||
|
||||
<script src="scripts/index.js"></script>
|
||||
|
|
|
@ -50,7 +50,9 @@ function LoadLogWindow(divSelector) {
|
|||
}
|
||||
|
||||
function SetCode(func) {
|
||||
$("#txtCode").val(BodyCodeOfFunction(func));
|
||||
var codeHtml = '<pre id="txtCode" class="brush: js; gutter: false;">';
|
||||
codeHtml = codeHtml + BodyCodeOfFunction(func) + '</pre><script type="text/javascript" src="syntaxhighlighter/syntaxhighlighter.js"></script>';
|
||||
$("#highlighter").html(codeHtml);
|
||||
|
||||
var runFunc = mapFunc(func);
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<div id="authStepDiv">
|
||||
<div id="sampleReport" class="line">
|
||||
<div id="sampleReport" class="pbi-line">
|
||||
<div class="pageTitle">
|
||||
<h3>Sample Report</h3>
|
||||
<h8>You can embed a sample report and interact with Power BI Embedded firsthand by clicking below.</h8>
|
||||
|
@ -12,14 +12,14 @@
|
|||
|
||||
<hr />
|
||||
|
||||
<div id="userReport" class="line">
|
||||
<div id="userReport" class="pbi-line">
|
||||
<div class="pageTitle">
|
||||
<h3>Embed your own report</h3>
|
||||
<h8>You can also embed your own report by following the instructions below.</h8>
|
||||
</div>
|
||||
<div class="settings">
|
||||
<div id="EmbedWithSpecificReportDiv">
|
||||
<div class="line">
|
||||
<div class="pbi-line">
|
||||
<h5>Prerequisites</h5>
|
||||
<ul>
|
||||
<li>A workspace in the <a href="https://azure.microsoft.com/en-us/documentation/articles/power-bi-embedded-get-started/">Power BI embedded service.</a></li>
|
||||
|
@ -27,7 +27,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="line">
|
||||
<div class="pbi-line">
|
||||
<h5>Instructions to generate an embed App Token</h5>
|
||||
Once you have improted a report into Power BI workspace, you are ready to embed it.
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="authorizeParameterDiv" class="line">
|
||||
<div id="authorizeParameterDiv" class="pbi-line">
|
||||
<h5>Enter embed details</h5>
|
||||
|
||||
<table id="user-embed-details">
|
||||
|
|
|
@ -134,7 +134,7 @@ a {
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
.line {
|
||||
.pbi-line {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
@ -509,10 +509,12 @@ a {
|
|||
width: 100%;
|
||||
height: 300px;
|
||||
border: none;
|
||||
padding-top: 40px;
|
||||
padding: 20px;
|
||||
position: relative;
|
||||
top: -30px;
|
||||
padding-left: 20px;
|
||||
background: #FFFFFF;
|
||||
overflow: auto;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
#GoToEmbedStepButton {
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
.syntaxhighlighter {
|
||||
overflow: hidden !important;
|
||||
margin: 0em !important;
|
||||
padding: 0em !important;
|
||||
top: -98px !important;
|
||||
}
|
||||
|
||||
.syntaxhighlighter .line {
|
||||
white-space: pre-wrap !important;
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,238 @@
|
|||
.syntaxhighlighter a,
|
||||
.syntaxhighlighter div,
|
||||
.syntaxhighlighter code,
|
||||
.syntaxhighlighter table,
|
||||
.syntaxhighlighter table td,
|
||||
.syntaxhighlighter table tr,
|
||||
.syntaxhighlighter table tbody,
|
||||
.syntaxhighlighter table thead,
|
||||
.syntaxhighlighter table caption,
|
||||
.syntaxhighlighter textarea {
|
||||
-moz-border-radius: 0 0 0 0 !important;
|
||||
-webkit-border-radius: 0 0 0 0 !important;
|
||||
background: none !important;
|
||||
border: 0 !important;
|
||||
bottom: auto !important;
|
||||
float: none !important;
|
||||
height: auto !important;
|
||||
left: auto !important;
|
||||
line-height: 1.1em !important;
|
||||
margin: 0 !important;
|
||||
outline: 0 !important;
|
||||
overflow: visible !important;
|
||||
padding: 0 !important;
|
||||
position: static !important;
|
||||
right: auto !important;
|
||||
text-align: left !important;
|
||||
top: auto !important;
|
||||
vertical-align: baseline !important;
|
||||
width: auto !important;
|
||||
box-sizing: content-box !important;
|
||||
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
|
||||
font-weight: normal !important;
|
||||
font-style: normal !important;
|
||||
font-size: 1em !important;
|
||||
min-height: inherit !important;
|
||||
min-height: auto !important; }
|
||||
|
||||
.syntaxhighlighter {
|
||||
width: 100% !important;
|
||||
margin: 1em 0 1em 0 !important;
|
||||
position: relative !important;
|
||||
overflow: auto !important;
|
||||
font-size: 1em !important; }
|
||||
.syntaxhighlighter .container:before, .syntaxhighlighter .container:after {
|
||||
content: none !important; }
|
||||
.syntaxhighlighter.source {
|
||||
overflow: hidden !important; }
|
||||
.syntaxhighlighter .bold {
|
||||
font-weight: bold !important; }
|
||||
.syntaxhighlighter .italic {
|
||||
font-style: italic !important; }
|
||||
.syntaxhighlighter .line {
|
||||
white-space: pre !important; }
|
||||
.syntaxhighlighter table {
|
||||
width: 100% !important; }
|
||||
.syntaxhighlighter table caption {
|
||||
text-align: left !important;
|
||||
padding: .5em 0 0.5em 1em !important; }
|
||||
.syntaxhighlighter table td.code {
|
||||
width: 100% !important; }
|
||||
.syntaxhighlighter table td.code .container {
|
||||
position: relative !important; }
|
||||
.syntaxhighlighter table td.code .container textarea {
|
||||
box-sizing: border-box !important;
|
||||
position: absolute !important;
|
||||
left: 0 !important;
|
||||
top: 0 !important;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
border: none !important;
|
||||
background: white !important;
|
||||
padding-left: 1em !important;
|
||||
overflow: hidden !important;
|
||||
white-space: pre !important; }
|
||||
.syntaxhighlighter table td.gutter .line {
|
||||
text-align: right !important;
|
||||
padding: 0 0.5em 0 1em !important; }
|
||||
.syntaxhighlighter table td.code .line {
|
||||
padding: 0 1em !important; }
|
||||
.syntaxhighlighter.nogutter td.code .container textarea, .syntaxhighlighter.nogutter td.code .line {
|
||||
padding-left: 0em !important; }
|
||||
.syntaxhighlighter.show {
|
||||
display: block !important; }
|
||||
.syntaxhighlighter.collapsed table {
|
||||
display: none !important; }
|
||||
.syntaxhighlighter.collapsed .toolbar {
|
||||
padding: 0.1em 0.8em 0em 0.8em !important;
|
||||
font-size: 1em !important;
|
||||
position: static !important;
|
||||
width: auto !important;
|
||||
height: auto !important; }
|
||||
.syntaxhighlighter.collapsed .toolbar span {
|
||||
display: inline !important;
|
||||
margin-right: 1em !important; }
|
||||
.syntaxhighlighter.collapsed .toolbar span a {
|
||||
padding: 0 !important;
|
||||
display: none !important; }
|
||||
.syntaxhighlighter.collapsed .toolbar span a.expandSource {
|
||||
display: inline !important; }
|
||||
.syntaxhighlighter .toolbar {
|
||||
position: absolute !important;
|
||||
right: 1px !important;
|
||||
top: 1px !important;
|
||||
width: 11px !important;
|
||||
height: 11px !important;
|
||||
font-size: 10px !important;
|
||||
z-index: 10 !important; }
|
||||
.syntaxhighlighter .toolbar span.title {
|
||||
display: inline !important; }
|
||||
.syntaxhighlighter .toolbar a {
|
||||
display: block !important;
|
||||
text-align: center !important;
|
||||
text-decoration: none !important;
|
||||
padding-top: 1px !important; }
|
||||
.syntaxhighlighter .toolbar a.expandSource {
|
||||
display: none !important; }
|
||||
.syntaxhighlighter.ie {
|
||||
font-size: .9em !important;
|
||||
padding: 1px 0 1px 0 !important; }
|
||||
.syntaxhighlighter.ie .toolbar {
|
||||
line-height: 8px !important; }
|
||||
.syntaxhighlighter.ie .toolbar a {
|
||||
padding-top: 0px !important; }
|
||||
.syntaxhighlighter.printing .line.alt1 .content,
|
||||
.syntaxhighlighter.printing .line.alt2 .content,
|
||||
.syntaxhighlighter.printing .line.highlighted .number,
|
||||
.syntaxhighlighter.printing .line.highlighted.alt1 .content,
|
||||
.syntaxhighlighter.printing .line.highlighted.alt2 .content {
|
||||
background: none !important; }
|
||||
.syntaxhighlighter.printing .line .number {
|
||||
color: #bbbbbb !important; }
|
||||
.syntaxhighlighter.printing .line .content {
|
||||
color: black !important; }
|
||||
.syntaxhighlighter.printing .toolbar {
|
||||
display: none !important; }
|
||||
.syntaxhighlighter.printing a {
|
||||
text-decoration: none !important; }
|
||||
.syntaxhighlighter.printing .plain, .syntaxhighlighter.printing .plain a {
|
||||
color: black !important; }
|
||||
.syntaxhighlighter.printing .comments, .syntaxhighlighter.printing .comments a {
|
||||
color: #008200 !important; }
|
||||
.syntaxhighlighter.printing .string, .syntaxhighlighter.printing .string a {
|
||||
color: blue !important; }
|
||||
.syntaxhighlighter.printing .keyword {
|
||||
color: #006699 !important;
|
||||
font-weight: bold !important; }
|
||||
.syntaxhighlighter.printing .preprocessor {
|
||||
color: gray !important; }
|
||||
.syntaxhighlighter.printing .variable {
|
||||
color: #aa7700 !important; }
|
||||
.syntaxhighlighter.printing .value {
|
||||
color: #009900 !important; }
|
||||
.syntaxhighlighter.printing .functions {
|
||||
color: #ff1493 !important; }
|
||||
.syntaxhighlighter.printing .constants {
|
||||
color: #0066cc !important; }
|
||||
.syntaxhighlighter.printing .script {
|
||||
font-weight: bold !important; }
|
||||
.syntaxhighlighter.printing .color1, .syntaxhighlighter.printing .color1 a {
|
||||
color: gray !important; }
|
||||
.syntaxhighlighter.printing .color2, .syntaxhighlighter.printing .color2 a {
|
||||
color: #ff1493 !important; }
|
||||
.syntaxhighlighter.printing .color3, .syntaxhighlighter.printing .color3 a {
|
||||
color: red !important; }
|
||||
.syntaxhighlighter.printing .break, .syntaxhighlighter.printing .break a {
|
||||
color: black !important; }
|
||||
|
||||
.syntaxhighlighter {
|
||||
background-color: white !important; }
|
||||
.syntaxhighlighter .line.alt1 {
|
||||
background-color: white !important; }
|
||||
.syntaxhighlighter .line.alt2 {
|
||||
background-color: white !important; }
|
||||
.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 {
|
||||
background-color: #e0e0e0 !important; }
|
||||
.syntaxhighlighter .line.highlighted.number {
|
||||
color: black !important; }
|
||||
.syntaxhighlighter table caption {
|
||||
color: black !important; }
|
||||
.syntaxhighlighter table td.code .container textarea {
|
||||
background: white;
|
||||
color: black; }
|
||||
.syntaxhighlighter .gutter {
|
||||
color: #afafaf !important; }
|
||||
.syntaxhighlighter .gutter .line {
|
||||
border-right: 3px solid #6ce26c !important; }
|
||||
.syntaxhighlighter .gutter .line.highlighted {
|
||||
background-color: #6ce26c !important;
|
||||
color: white !important; }
|
||||
.syntaxhighlighter.printing .line .content {
|
||||
border: none !important; }
|
||||
.syntaxhighlighter.collapsed {
|
||||
overflow: visible !important; }
|
||||
.syntaxhighlighter.collapsed .toolbar {
|
||||
color: #00f !important;
|
||||
background: #fff !important;
|
||||
border: 1px solid #6ce26c !important; }
|
||||
.syntaxhighlighter.collapsed .toolbar a {
|
||||
color: #00f !important; }
|
||||
.syntaxhighlighter.collapsed .toolbar a:hover {
|
||||
color: #f00 !important; }
|
||||
.syntaxhighlighter .toolbar {
|
||||
color: #fff !important;
|
||||
background: #6ce26c !important;
|
||||
border: none !important; }
|
||||
.syntaxhighlighter .toolbar a {
|
||||
color: #fff !important; }
|
||||
.syntaxhighlighter .toolbar a:hover {
|
||||
color: #000 !important; }
|
||||
.syntaxhighlighter .plain, .syntaxhighlighter .plain a {
|
||||
color: black !important; }
|
||||
.syntaxhighlighter .comments, .syntaxhighlighter .comments a {
|
||||
color: #008200 !important; }
|
||||
.syntaxhighlighter .string, .syntaxhighlighter .string a {
|
||||
color: blue !important; }
|
||||
.syntaxhighlighter .keyword {
|
||||
font-weight: bold !important;
|
||||
color: #006699 !important; }
|
||||
.syntaxhighlighter .preprocessor {
|
||||
color: gray !important; }
|
||||
.syntaxhighlighter .variable {
|
||||
color: #aa7700 !important; }
|
||||
.syntaxhighlighter .value {
|
||||
color: #009900 !important; }
|
||||
.syntaxhighlighter .functions {
|
||||
color: #ff1493 !important; }
|
||||
.syntaxhighlighter .constants {
|
||||
color: #0066cc !important; }
|
||||
.syntaxhighlighter .script {
|
||||
font-weight: bold !important;
|
||||
color: #006699 !important;
|
||||
background-color: none !important; }
|
||||
.syntaxhighlighter .color1, .syntaxhighlighter .color1 a {
|
||||
color: gray !important; }
|
||||
.syntaxhighlighter .color2, .syntaxhighlighter .color2 a {
|
||||
color: #ff1493 !important; }
|
||||
.syntaxhighlighter .color3, .syntaxhighlighter .color3 a {
|
||||
color: red !important; }
|
|
@ -35,7 +35,8 @@
|
|||
"bootstrap": "^3.3.6",
|
||||
"jquery": "^3.1.0",
|
||||
"powerbi-client": "^2.2.7",
|
||||
"http-server": "^0.9.0"
|
||||
"http-server": "^0.9.0",
|
||||
"syntaxhighlighter": "4.0.1"
|
||||
},
|
||||
"devDependencies": {}
|
||||
}
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Загрузка…
Ссылка в новой задаче